aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Target
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
commit2dcafe4b8f84cdb0d084421f11cdca08cd6b951d (patch)
tree9bcca60ce6efe7e72eeedcd834fabb1a04066d99 /include/llvm/Target
parente5ca0ac36be44057ba5a5ad300c685b7967ff5ec (diff)
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/llvm/Target')
-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 dd311c3116..65a919af69 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 42545c62fc..8b2679090e 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