diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/DarwinTargetAsmInfo.h | 5 | ||||
-rw-r--r-- | include/llvm/Target/ELFTargetAsmInfo.h | 9 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 9 |
3 files changed, 19 insertions, 4 deletions
diff --git a/include/llvm/Target/DarwinTargetAsmInfo.h b/include/llvm/Target/DarwinTargetAsmInfo.h index 8eef95dfa4..edce64096a 100644 --- a/include/llvm/Target/DarwinTargetAsmInfo.h +++ b/include/llvm/Target/DarwinTargetAsmInfo.h @@ -39,7 +39,10 @@ namespace llvm { SectionKind::Kind kind) const; virtual bool emitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const; - const Section* SelectSectionForMachineConst(const Type *Ty) const; + + + virtual const Section * + getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const; private: const Section* MergeableConstSection(const Type *Ty) const; diff --git a/include/llvm/Target/ELFTargetAsmInfo.h b/include/llvm/Target/ELFTargetAsmInfo.h index fd269a1430..c06a5a9f28 100644 --- a/include/llvm/Target/ELFTargetAsmInfo.h +++ b/include/llvm/Target/ELFTargetAsmInfo.h @@ -25,11 +25,16 @@ namespace llvm { struct ELFTargetAsmInfo: public TargetAsmInfo { explicit ELFTargetAsmInfo(const TargetMachine &TM); + /// getSectionForMergableConstant - Given a mergable constant with the + /// specified size and relocation information, return a section that it + /// should be placed in. + virtual const Section * + getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const; + + SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const; virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; virtual std::string printSectionFlags(unsigned flags) const; - virtual const Section* - SelectSectionForMachineConst(const Type *Ty) const; const Section* DataRelSection; const Section* DataRelLocalSection; diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index e59b12a7cd..0140433413 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -595,6 +595,14 @@ namespace llvm { virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason, bool Global) const; + + /// getSectionForMergableConstant - Given a mergable constant with the + /// specified size and relocation information, return a section that it + /// should be placed in. + virtual const Section * + getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const; + + /// SectionKindForGlobal - This hook allows the target to select proper /// section kind used for global emission. // FIXME: Eliminate this. @@ -623,7 +631,6 @@ namespace llvm { // FIXME: Eliminate this. virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; - virtual const Section* SelectSectionForMachineConst(const Type *Ty) const; /// getSLEB128Size - Compute the number of bytes required for a signed /// leb128 value. |