remove the 'DataSectionStartSuffix' and 'TextSectionStartSuffix' knobs.
authorChris Lattner <sabre@nondot.org>
Wed, 5 Aug 2009 20:49:52 +0000 (20:49 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 5 Aug 2009 20:49:52 +0000 (20:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78242 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetAsmInfo.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/TargetAsmInfo.cpp
lib/Target/X86/X86TargetAsmInfo.cpp

index 2efec329f30979d4eb07ddfe567c91ff46767c76..e24302b84efd8a812e934b79bb1dafdd6c17f217 100644 (file)
@@ -190,14 +190,6 @@ namespace llvm {
     /// this.
     const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
     
-    /// TextSectionStartSuffix - This is printed after each start of section
-    /// directive for text sections.
-    const char *TextSectionStartSuffix;   // Defaults to "".
-
-    /// DataSectionStartSuffix - This is printed after each start of section
-    /// directive for data sections.
-    const char *DataSectionStartSuffix;   // Defaults to "".
-    
     /// JumpTableDirective - if non-null, the directive to emit before a jump
     /// table.
     const char *JumpTableDirective;
@@ -444,12 +436,6 @@ namespace llvm {
     const char *getSwitchToSectionDirective() const {
       return SwitchToSectionDirective;
     }
-    const char *getTextSectionStartSuffix() const {
-      return TextSectionStartSuffix;
-    }
-    const char *getDataSectionStartSuffix() const {
-      return DataSectionStartSuffix;
-    }
     const char *getGlobalDirective() const {
       return GlobalDirective;
     }
index 69bc5edf3721e25e558ea1d88a59e983233592ff..3102bdae017c1df0a64e7504b085e9156d5e7477 100644 (file)
@@ -92,21 +92,19 @@ void AsmPrinter::SwitchToSection(const MCSection *NS) {
 
   CurrentSection = NS;
 
-  if (NS != 0) {
-    // If section is named we need to switch into it via special '.section'
-    // directive and also append funky flags. Otherwise - section name is just
-    // some magic assembler directive.
-    if (!NS->isDirective()) {
-      SmallString<32> FlagsStr;
-      
-      getObjFileLowering().getSectionFlagsAsString(NS->getKind(), FlagsStr);
-
-      O << TAI->getSwitchToSectionDirective()
-        << CurrentSection->getName() << FlagsStr.c_str();
-    } else {
-      O << CurrentSection->getName();
-    }
-    O << TAI->getDataSectionStartSuffix() << '\n';
+  if (NS == 0) return;
+  
+  // If section is named we need to switch into it via special '.section'
+  // directive and also append funky flags. Otherwise - section name is just
+  // some magic assembler directive.
+  if (!NS->isDirective()) {
+    SmallString<32> FlagsStr;
+    getObjFileLowering().getSectionFlagsAsString(NS->getKind(), FlagsStr);
+
+    O << TAI->getSwitchToSectionDirective()
+      << CurrentSection->getName() << FlagsStr.c_str() << '\n';
+  } else {
+    O << CurrentSection->getName() << '\n';
   }
 }
 
index 5be769319bd208b3bf122030ac35642796555cd0..5f20ea0fc1b87ae47c3f45749fed52d3e944b6a1 100644 (file)
@@ -55,8 +55,6 @@ TargetAsmInfo::TargetAsmInfo() {
   AlignmentIsInBytes = true;
   TextAlignFillValue = 0;
   SwitchToSectionDirective = "\t.section\t";
-  TextSectionStartSuffix = "";
-  DataSectionStartSuffix = "";
   JumpTableDirective = 0;
   GlobalDirective = "\t.globl\t";
   SetDirective = 0;
index 3a5772c19ef4ca425573934f817895d98323aa4e..297ebf594b077b564b9a9265f50f6b8fba4c8b21 100644 (file)
@@ -130,10 +130,6 @@ X86WinTargetAsmInfo::X86WinTargetAsmInfo(const X86TargetMachine &TM):
   HasSingleParameterDotFile = false;
 
   AlignmentIsInBytes = true;
-
-  SwitchToSectionDirective = "";
-  TextSectionStartSuffix = "\tSEGMENT PARA 'CODE'";
-  DataSectionStartSuffix = "\tSEGMENT PARA 'DATA'";
 }
 
 // Instantiate default implementation.