The MASM asmprinter has been fixed, these hacks are no longer needed.
authorChris Lattner <sabre@nondot.org>
Tue, 9 May 2006 05:13:34 +0000 (05:13 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 9 May 2006 05:13:34 +0000 (05:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28186 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index 5b44c9ca5d38c610e6d5423732768e2879e876a0..242a4fbbd04cd87cc121fc9018ddcea7018ac94e 100644 (file)
@@ -70,19 +70,10 @@ void AsmPrinter::SwitchToTextSection(const char *NewSection,
   // sections.
 
   if (MLSections) {
-    if (*NewSection == 0) {
-      // Simply end the current section, if any.
-      if (!CurrentSection.empty()) {
-        O << CurrentSection << "\tends\n\n";
-        CurrentSection.clear();
-      }
-      return;
-    }
-
     if (GV && GV->hasSection())
       NS = GV->getSection();
     else
-      NS = "_text";
+      NS = NewSection;
 
     if (CurrentSection != NS) {
       if (!CurrentSection.empty())
@@ -115,19 +106,10 @@ void AsmPrinter::SwitchToDataSection(const char *NewSection,
   // sections.
   
   if (MLSections) {
-    if (*NewSection == 0) {
-      // Simply end the current section, if any.
-      if (!CurrentSection.empty()) {
-        O << CurrentSection << "\tends\n\n";
-        CurrentSection.clear();
-      }
-      return;
-    }
-    
     if (GV && GV->hasSection())
       NS = GV->getSection();
     else
-      NS = "_data";
+      NS = NewSection;
     
     if (CurrentSection != NS) {
       if (!CurrentSection.empty())