[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 20 22:55:40 PST 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaAsmPrinter.cpp updated: 1.21 -> 1.22
---
Log message:

Rename SwitchSection -> switchSection to avoid conflicting with a future
change.


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

 AlphaAsmPrinter.cpp |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp
diff -u llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.21 llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.22
--- llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp:1.21	Mon Nov 21 00:51:52 2005
+++ llvm/lib/Target/Alpha/AlphaAsmPrinter.cpp	Mon Nov 21 00:55:27 2005
@@ -66,7 +66,7 @@
     bool runOnMachineFunction(MachineFunction &F);
     bool doInitialization(Module &M);
     bool doFinalization(Module &M);
-    void SwitchSection(std::ostream &OS, const char *NewSection);
+    void switchSection(std::ostream &OS, const char *NewSection);
   };
 } // end of anonymous namespace
 
@@ -180,7 +180,7 @@
   printConstantPool(MF.getConstantPool());
 
   // Print out labels for the function.
-  SwitchSection(O, "text");
+  switchSection(O, "text");
   emitAlignment(4);
   O << "\t.globl " << CurrentFnName << "\n";
   O << "\t.ent " << CurrentFnName << "\n";
@@ -220,9 +220,9 @@
 
   if (CP.empty()) return;
 
-  SwitchSection(O, "rodata");
+  switchSection(O, "rodata");
   for (unsigned i = 0, e = CP.size(); i != e; ++i) {
-    //    SwitchSection(O, "section .rodata, \"dr\"");
+    //    switchSection(O, "section .rodata, \"dr\"");
     emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
     O << PrivateGlobalPrefix << "CPI" << CurrentFnName << "_" << i 
       << ":\t\t\t\t\t" << CommentString << *CP[i] << "\n";
@@ -243,10 +243,10 @@
 }
 
 
-// SwitchSection - Switch to the specified section of the executable if we are
+// switchSection - Switch to the specified section of the executable if we are
 // not already in it!
 //
-void AlphaAsmPrinter::SwitchSection(std::ostream &OS, const char *NewSection)
+void AlphaAsmPrinter::switchSection(std::ostream &OS, const char *NewSection)
 {
   if (CurSection != NewSection) {
     CurSection = NewSection;
@@ -269,7 +269,7 @@
       if (C->isNullValue() &&
           (I->hasLinkOnceLinkage() || I->hasInternalLinkage() ||
            I->hasWeakLinkage() /* FIXME: Verify correct */)) {
-        SwitchSection(O, "data");
+        switchSection(O, "data");
         if (I->hasInternalLinkage())
           O << "\t.local " << name << "\n";
 
@@ -284,7 +284,7 @@
         case GlobalValue::WeakLinkage:   // FIXME: Verify correct for weak.
           // Nonnull linkonce -> weak
           O << "\t.weak " << name << "\n";
-          SwitchSection(O, "");
+          switchSection(O, "");
           O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\", at progbits\n";
           break;
         case GlobalValue::AppendingLinkage:
@@ -296,9 +296,9 @@
           // FALL THROUGH
         case GlobalValue::InternalLinkage:
           if (C->isNullValue())
-            SwitchSection(O, "bss");
+            switchSection(O, "bss");
           else
-            SwitchSection(O, "data");
+            switchSection(O, "data");
           break;
         case GlobalValue::GhostLinkage:
           std::cerr << "GhostLinkage cannot appear in AlphaAsmPrinter!\n";






More information about the llvm-commits mailing list