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

Chris Lattner lattner at cs.uiuc.edu
Tue Jul 26 12:03:38 PDT 2005



Changes in directory llvm/lib/Target/PowerPC:

PowerPCAsmPrinter.cpp updated: 1.82 -> 1.83
---
Log message:

Wrap some long lines, fix emission of weak global variables


---
Diffs of the changes:  (+9 -8)

 PowerPCAsmPrinter.cpp |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)


Index: llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.82 llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.83
--- llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.82	Thu Jul 21 15:44:42 2005
+++ llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp	Tue Jul 26 14:03:27 2005
@@ -474,11 +474,9 @@
             << ".section __DATA,__datacoal_nt,coalesced,no_toc\n";
           LinkOnceStubs.insert(name);
           break;
-        case GlobalValue::WeakLinkage:   // FIXME: Verify correct for weak.
-          // Nonnull linkonce -> weak
-          O << "\t.weak " << name << "\n";
-          SwitchSection(O, CurSection, "");
-          O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\", at progbits\n";
+        case GlobalValue::WeakLinkage:
+          O << ".weak_definition " << name << '\n'
+            << ".private_extern " << name << '\n';
           break;
         case GlobalValue::AppendingLinkage:
           // FIXME: appending linkage variables should go into a section of
@@ -647,7 +645,8 @@
     << "\t.csect .text[PR]\n";
 
   // Print out module-level global variables
-  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())
       continue;
 
@@ -666,7 +665,8 @@
 
   // Output labels for globals
   if (M.global_begin() != M.global_end()) O << "\t.toc\n";
-  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) {
     const GlobalVariable *GV = I;
     // Do not output labels for unused variables
     if (GV->isExternal() && GV->use_begin() == GV->use_end())
@@ -688,7 +688,8 @@
 bool AIXAsmPrinter::doFinalization(Module &M) {
   const TargetData &TD = TM.getTargetData();
   // Print out module-level global variables
-  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() || I->hasExternalLinkage())
       continue;
 






More information about the llvm-commits mailing list