remove SectionFlags::Small: it is only used on Xcore, and we'll find
authorChris Lattner <sabre@nondot.org>
Wed, 22 Jul 2009 23:27:22 +0000 (23:27 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 Jul 2009 23:27:22 +0000 (23:27 +0000)
a better solution for it in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76818 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetAsmInfo.h
lib/Target/ELFTargetAsmInfo.cpp
lib/Target/Mips/MipsTargetAsmInfo.cpp
lib/Target/Mips/MipsTargetAsmInfo.h
lib/Target/TargetAsmInfo.cpp
lib/Target/XCore/XCoreTargetAsmInfo.cpp

index 01404334138c555617102de1ee14cce1fe67d0b9..447297cddc318f9267e934fe2dc8e81746fb78d8 100644 (file)
@@ -85,7 +85,6 @@ namespace llvm {
     const unsigned TLS        = 1 << 5;  ///< Section contains thread-local data
     const unsigned Debug      = 1 << 6;  ///< Section contains debug data
     const unsigned Linkonce   = 1 << 7;  ///< Section is linkonce
-    const unsigned Small      = 1 << 8;  ///< Section is small
     const unsigned TypeFlags  = 0xFF;
     // Some gap for future flags
     const unsigned Named      = 1 << 23; ///< Section is named
index b5babed817d736897e284c3faaf49d9f8837c106..8cadb53079380e65288bf5e9bfb353d414f824a9 100644 (file)
@@ -207,8 +207,6 @@ std::string ELFTargetAsmInfo::printSectionFlags(unsigned flags) const {
     Flags += 'S';
   if (flags & SectionFlags::TLS)
     Flags += 'T';
-  if (flags & SectionFlags::Small)
-    Flags += 's';
 
   Flags += "\",";
 
index c197b0c2981cce105fffc91bb6eacbc0882cdaa8..f086db02d266f7b0df6c29d0c217b049d6d24f79 100644 (file)
@@ -45,14 +45,6 @@ MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM):
 
 }
 
-unsigned MipsTargetAsmInfo::
-SectionFlagsForGlobal(const GlobalValue *GV, const char* Name) const {
-  unsigned Flags = ELFTargetAsmInfo::SectionFlagsForGlobal(GV, Name);
-  // Mask out Small Section flag bit, Mips doesnt support 's' section symbol
-  // for its small sections.
-  return (Flags & (~SectionFlags::Small));
-}
-
 SectionKind::Kind MipsTargetAsmInfo::
 SectionKindForGlobal(const GlobalValue *GV) const {
   SectionKind::Kind K = ELFTargetAsmInfo::SectionKindForGlobal(GV);
index 2b5a739e7219ea9c271ed536a75a7b0058bfe577..74bba10b2393ec080ddfacd7a891229fd3f3ea2b 100644 (file)
@@ -34,12 +34,6 @@ namespace llvm {
     virtual SectionKind::Kind
     SectionKindForGlobal(const GlobalValue *GV) const;
 
-    /// SectionFlagsForGlobal - This hook allows the target to select proper
-    /// section flags either for given global or for section.
-    virtual unsigned
-    SectionFlagsForGlobal(const GlobalValue *GV = NULL,
-                          const char* name = NULL) const;
-
     virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
 
     private:
index a2fe4185e9a909a24f9734132d18c6fcf4debba0..1af112c7925e04893a76b14823d3235a4d1cfa7b 100644 (file)
@@ -260,9 +260,8 @@ TargetAsmInfo::SectionFlagsForGlobal(const GlobalValue *GV,
     case SectionKind::SmallData:
     case SectionKind::SmallBSS:
       Flags |= SectionFlags::Writeable;
-      // FALLS THROUGH
+      break;
     case SectionKind::SmallROData:
-      Flags |= SectionFlags::Small;
       break;
     default:
       llvm_unreachable("Unexpected section kind!");
index 842c427b3b295861ece17045371e3ddaf288c008..6fc6dc2c7b3e323aaf6bc4e8b76eb53da3f0d4e1 100644 (file)
@@ -25,10 +25,9 @@ XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM)
   : ELFTargetAsmInfo(TM) {
   SupportsDebugInformation = true;
   TextSection = getUnnamedSection("\t.text", SectionFlags::Code);
-  DataSection = getNamedSection("\t.dp.data", SectionFlags::Writeable |
-                                SectionFlags::Small);
+  DataSection = getNamedSection("\t.dp.data", SectionFlags::Writeable);
   BSSSection_  = getNamedSection("\t.dp.bss", SectionFlags::Writeable |
-                                 SectionFlags::BSS | SectionFlags::Small);
+                                 SectionFlags::BSS);
 
   // TLS globals are lowered in the backend to arrays indexed by the current
   // thread id. After lowering they require no special handling by the linker
@@ -36,14 +35,10 @@ XCoreTargetAsmInfo::XCoreTargetAsmInfo(const XCoreTargetMachine &TM)
   TLSDataSection = DataSection;
   TLSBSSSection = BSSSection_;
 
-  if (TM.getSubtargetImpl()->isXS1A()) {
-    ReadOnlySection = getNamedSection("\t.dp.rodata", SectionFlags::None |
-                                      SectionFlags::Writeable |
-                                      SectionFlags::Small);
-  } else {
-    ReadOnlySection = getNamedSection("\t.cp.rodata", SectionFlags::None |
-                                      SectionFlags::Small);
-  }
+  if (TM.getSubtargetImpl()->isXS1A())
+    ReadOnlySection = getNamedSection("\t.dp.rodata", SectionFlags::Writeable);
+  else
+    ReadOnlySection = getNamedSection("\t.cp.rodata", SectionFlags::None);
   Data16bitsDirective = "\t.short\t";
   Data32bitsDirective = "\t.long\t";
   Data64bitsDirective = 0;