diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 9b5ba48..3b16ef1 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -29,8 +29,22 @@ namespace llvm { }; } + namespace SectionKind { + enum Kind { + Text, ///< Text section + Data, ///< Data section + BSS, ///< BSS section + ROData, ///< Readonly data section + RODataMergeStr, ///< Readonly data section (mergeable strings) + RODataMergeConst, ///< Readonly data section (mergeable constants) + ThreadData, ///< Initialized TLS data objects + ThreadBSS ///< Uninitialized TLS data objects + }; + } + class TargetMachine; class CallInst; + class GlobalValue; /// TargetAsmInfo - This class is intended to be used as a base class for asm /// properties and features specific to the target. @@ -427,7 +441,11 @@ namespace llvm { /// if the symbol can be relocated. virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason, bool Global) const; - + + /// SectionKindForGlobal - This hook allows the target to select proper + /// section kind used for global emission. + SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const; + // Accessors. // const char *getTextSection() const { @@ -642,7 +660,7 @@ namespace llvm { } const char *getDwarfSectionOffsetDirective() const { return DwarfSectionOffsetDirective; - } + } const char *getDwarfAbbrevSection() const { return DwarfAbbrevSection; } |