Add ReadOnlySection directive.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 8 Mar 2007 01:00:38 +0000 (01:00 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 8 Mar 2007 01:00:38 +0000 (01:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35015 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetAsmInfo.h
lib/Target/TargetAsmInfo.cpp

index 36f5a1906b522d863f1c6b093f3623c07b5dbe6b..04f9118f837712b38035674988884a9efdd6165b 100644 (file)
@@ -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;
     }
index da477493440ef058adc67929e7857e2a1ddc6f34..cf3f6eec39a55748b0d445c7b621c15c053c893b 100644 (file)
@@ -60,6 +60,7 @@ TargetAsmInfo::TargetAsmInfo() :
   FourByteConstantSection(0),
   EightByteConstantSection(0),
   SixteenByteConstantSection(0),
+  ReadOnlySection(0),
   GlobalDirective(0),
   SetDirective(0),
   LCOMMDirective(0),