aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-24 17:02:17 +0000
committerChris Lattner <sabre@nondot.org>2009-07-24 17:02:17 +0000
commitdfd1598b48e3a814cf814ab73045c4fac52c1759 (patch)
tree9bcca60ce6efe7e72eeedcd834fabb1a04066d99 /include
parent2e93237fe64e1d6abd99b61861eedd6f53014777 (diff)
downloadexternal_llvm-dfd1598b48e3a814cf814ab73045c4fac52c1759.zip
external_llvm-dfd1598b48e3a814cf814ab73045c4fac52c1759.tar.gz
external_llvm-dfd1598b48e3a814cf814ab73045c4fac52c1759.tar.bz2
move ELF-specific code into ELFTargetAsmInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-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