aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Target/ELFTargetAsmInfo.h5
-rw-r--r--include/llvm/Target/TargetAsmInfo.h8
2 files changed, 12 insertions, 1 deletions
diff --git a/include/llvm/Target/ELFTargetAsmInfo.h b/include/llvm/Target/ELFTargetAsmInfo.h
index dd311c3..65a919a 100644
--- a/include/llvm/Target/ELFTargetAsmInfo.h
+++ b/include/llvm/Target/ELFTargetAsmInfo.h
@@ -31,6 +31,11 @@ namespace llvm {
virtual const Section *
getSectionForMergableConstant(uint64_t Size, unsigned ReloInfo) const;
+ /// getFlagsForNamedSection - If this target wants to be able to infer
+ /// section flags based on the name of the section specified for a global
+ /// variable, it can implement this. This is used on ELF systems so that
+ /// ".tbss" gets the TLS bit set etc.
+ virtual unsigned getFlagsForNamedSection(const char *Section) const;
SectionKind::Kind SectionKindForGlobal(const GlobalValue *GV) const;
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index 42545c6..8b26790 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -586,7 +586,13 @@ namespace llvm {
virtual const char *
getSectionPrefixForUniqueGlobal(SectionKind::Kind Kind) const;
-
+ /// getFlagsForNamedSection - If this target wants to be able to infer
+ /// section flags based on the name of the section specified for a global
+ /// variable, it can implement this. This is used on ELF systems so that
+ /// ".tbss" gets the TLS bit set etc.
+ virtual unsigned getFlagsForNamedSection(const char *Section) const {
+ return 0;
+ }
/// SectionKindForGlobal - This hook allows the target to select proper