1*9880d681SAndroid Build Coastguard Worker //===-- HexagonTargetObjectFile.h -----------------------------------------===// 2*9880d681SAndroid Build Coastguard Worker // 3*9880d681SAndroid Build Coastguard Worker // The LLVM Compiler Infrastructure 4*9880d681SAndroid Build Coastguard Worker // 5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source 6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details. 7*9880d681SAndroid Build Coastguard Worker // 8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H 11*9880d681SAndroid Build Coastguard Worker #define LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" 14*9880d681SAndroid Build Coastguard Worker #include "llvm/MC/MCSectionELF.h" 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Worker namespace llvm { 17*9880d681SAndroid Build Coastguard Worker 18*9880d681SAndroid Build Coastguard Worker class HexagonTargetObjectFile : public TargetLoweringObjectFileELF { 19*9880d681SAndroid Build Coastguard Worker public: 20*9880d681SAndroid Build Coastguard Worker void Initialize(MCContext &Ctx, const TargetMachine &TM) override; 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Worker MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, 23*9880d681SAndroid Build Coastguard Worker Mangler &Mang, const TargetMachine &TM) const override; 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Worker MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, 26*9880d681SAndroid Build Coastguard Worker Mangler &Mang, const TargetMachine &TM) const override; 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Worker bool isGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM) 29*9880d681SAndroid Build Coastguard Worker const; 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker bool isSmallDataEnabled() const; 32*9880d681SAndroid Build Coastguard Worker 33*9880d681SAndroid Build Coastguard Worker unsigned getSmallDataSize() const; 34*9880d681SAndroid Build Coastguard Worker 35*9880d681SAndroid Build Coastguard Worker private: 36*9880d681SAndroid Build Coastguard Worker MCSectionELF *SmallDataSection; 37*9880d681SAndroid Build Coastguard Worker MCSectionELF *SmallBSSSection; 38*9880d681SAndroid Build Coastguard Worker 39*9880d681SAndroid Build Coastguard Worker unsigned getSmallestAddressableSize(const Type *Ty, const GlobalValue *GV, 40*9880d681SAndroid Build Coastguard Worker const TargetMachine &TM) const; 41*9880d681SAndroid Build Coastguard Worker 42*9880d681SAndroid Build Coastguard Worker MCSection *selectSmallSectionForGlobal(const GlobalValue *GV, 43*9880d681SAndroid Build Coastguard Worker SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const; 44*9880d681SAndroid Build Coastguard Worker }; 45*9880d681SAndroid Build Coastguard Worker 46*9880d681SAndroid Build Coastguard Worker } // namespace llvm 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Worker #endif 49