[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon May 8 22:00:13 PDT 2006



Changes in directory llvm/lib/Target/Sparc:

SparcAsmPrinter.cpp updated: 1.64 -> 1.65
---
Log message:

Split SwitchSection into SwitchTo{Text|Data}Section methods.


---
Diffs of the changes:  (+6 -6)

 SparcAsmPrinter.cpp |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/Sparc/SparcAsmPrinter.cpp
diff -u llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.64 llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.65
--- llvm/lib/Target/Sparc/SparcAsmPrinter.cpp:1.64	Thu May  4 13:05:43 2006
+++ llvm/lib/Target/Sparc/SparcAsmPrinter.cpp	Mon May  8 23:59:56 2006
@@ -98,8 +98,8 @@
   CurrentFnName = Mang->getValueName(MF.getFunction());
 
   // Print out labels for the function.
-  O << "\t.text\n";
-  O << "\t.align 16\n";
+  SwitchToTextSection(".text", MF.getFunction());
+  EmitAlignment(4, MF.getFunction());
   O << "\t.globl\t" << CurrentFnName << "\n";
   O << "\t.type\t" << CurrentFnName << ", #function\n";
   O << CurrentFnName << ":\n";
@@ -238,7 +238,7 @@
       if (C->isNullValue() &&
           (I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
            I->hasWeakLinkage() /* FIXME: Verify correct */)) {
-        SwitchSection(".data", I);
+        SwitchToDataSection(".data", I);
         if (I->hasInternalLinkage())
           O << "\t.local " << name << "\n";
 
@@ -253,7 +253,7 @@
         case GlobalValue::WeakLinkage:   // FIXME: Verify correct for weak.
           // Nonnull linkonce -> weak
           O << "\t.weak " << name << "\n";
-          SwitchSection("", I);
+          SwitchToDataSection("", I);
           O << "\t.section\t\".llvm.linkonce.d." << name
             << "\",\"aw\", at progbits\n";
           break;
@@ -267,9 +267,9 @@
           // FALL THROUGH
         case GlobalValue::InternalLinkage:
           if (C->isNullValue())
-            SwitchSection(".bss", I);
+            SwitchToDataSection(".bss", I);
           else
-            SwitchSection(".data", I);
+            SwitchToDataSection(".data", I);
           break;
         case GlobalValue::GhostLinkage:
           std::cerr << "Should not have any unmaterialized functions!\n";






More information about the llvm-commits mailing list