[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 14 11:00:41 PST 2005



Changes in directory llvm/lib/Target/PowerPC:

PPCAsmPrinter.cpp updated: 1.107 -> 1.108
---
Log message:

Handle globals with explicit alignment requests


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

 PPCAsmPrinter.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.107 llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.108
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1.107	Mon Nov 14 12:52:46 2005
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp	Mon Nov 14 13:00:30 2005
@@ -74,7 +74,6 @@
       else
         NS = NewSection;
       
-      
       if (CurSection != NS) {
         CurSection = NS;
         if (!CurSection.empty())
@@ -398,7 +397,7 @@
   // Print out labels for the function.
   const Function *F = MF.getFunction();
   SwitchSection(".text", F);
-  emitAlignment(4);
+  emitAlignment(4, F);
   if (!F->hasInternalLinkage())
     O << "\t.globl\t" << CurrentFnName << "\n";
   O << CurrentFnName << ":\n";
@@ -466,7 +465,8 @@
   const TargetData &TD = TM.getTargetData();
 
   // Print out module-level global variables here.
-  for (Module::const_global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
+  for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
+       I != E; ++I)
     if (I->hasInitializer()) {   // External global require no code
       O << '\n';
       std::string name = Mang->getValueName(I);
@@ -512,7 +512,7 @@
           abort();
         }
 
-        emitAlignment(Align);
+        emitAlignment(Align, I);
         O << name << ":\t\t\t\t; '" << I->getName() << "'\n";
         emitGlobalConstant(C);
       }






More information about the llvm-commits mailing list