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

Nate Begeman natebegeman at mac.com
Mon Nov 8 20:01:29 PST 2004



Changes in directory llvm/lib/Target/PowerPC:

PowerPCAsmPrinter.cpp updated: 1.65 -> 1.66
---
Log message:

Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen

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

Index: llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.65 llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.66
--- llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.65	Tue Oct 26 01:02:38 2004
+++ llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp	Mon Nov  8 22:01:18 2004
@@ -367,8 +367,8 @@
     }
     
     // External or weakly linked global variables need non-lazily-resolved stubs
-    if ((GV->isExternal() || GV->hasWeakLinkage()) && 
-        getTM().AddressTaken.count(GV)) {
+    if ((GV->isExternal() || GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()) 
+         && getTM().AddressTaken.count(GV)) {
       GVStubs.insert(Name);
       O << "L" << Name << "$non_lazy_ptr";
       return;
@@ -472,7 +472,8 @@
       unsigned Align = TD.getTypeAlignmentShift(C->getType());
 
       if (C->isNullValue() && /* FIXME: Verify correct */
-          (I->hasInternalLinkage() || I->hasWeakLinkage())) {
+          (I->hasInternalLinkage() || I->hasWeakLinkage() || 
+           I->hasLinkOnceLinkage())) {
         SwitchSection(O, CurSection, ".data");
         if (I->hasInternalLinkage())
           O << ".lcomm " << name << "," << TD.getTypeSize(C->getType())






More information about the llvm-commits mailing list