diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-03-08 01:00:38 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-08 01:00:38 +0000 |
commit | be346c94760037842bb12c9c8434a23c70a00162 (patch) | |
tree | b0c046dadeda52140e1561c0a3abf3a837af1e23 | |
parent | afe15815571b34d7d53e5a005240686089b18361 (diff) |
Add ReadOnlySection directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35015 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 10 | ||||
-rw-r--r-- | lib/Target/TargetAsmInfo.cpp | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index 36f5a1906b..04f9118f83 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -203,7 +203,12 @@ namespace llvm { const char *FourByteConstantSection; const char *EightByteConstantSection; const char *SixteenByteConstantSection; - + + /// ReadOnlySection - This is the directive that is emitted to switch to a + /// read-only section for constant data (e.g. data declared const, + /// jump tables). + const char *ReadOnlySection; // Defaults to NULL + //===--- Global Variable Emission Directives --------------------------===// /// GlobalDirective - This is the directive used to declare a global entity. @@ -474,6 +479,9 @@ namespace llvm { const char *getSixteenByteConstantSection() const { return SixteenByteConstantSection; } + const char *getReadOnlySection() const { + return ReadOnlySection; + } const char *getGlobalDirective() const { return GlobalDirective; } diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index da47749344..cf3f6eec39 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -60,6 +60,7 @@ TargetAsmInfo::TargetAsmInfo() : FourByteConstantSection(0), EightByteConstantSection(0), SixteenByteConstantSection(0), + ReadOnlySection(0), GlobalDirective(0), SetDirective(0), LCOMMDirective(0), |