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

Chris Lattner lattner at cs.uiuc.edu
Thu Jan 5 17:04:15 PST 2006



Changes in directory llvm/lib/Target/PowerPC:

PPCISelLowering.cpp updated: 1.58 -> 1.59
---
Log message:

linkonce symbols have an extra indirection, just like weak ones do.  This fixes
Prolangs-C++/family and Prolangs-C++/primes.


---
Diffs of the changes:  (+2 -1)

 PPCISelLowering.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.58 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.59
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.58	Wed Jan  4 19:47:43 2006
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp	Thu Jan  5 19:04:03 2006
@@ -379,6 +379,7 @@
     
     // Only lower GlobalAddress on Darwin.
     if (!getTargetMachine().getSubtarget<PPCSubtarget>().isDarwin()) break;
+    
     SDOperand Hi = DAG.getNode(PPCISD::Hi, MVT::i32, GA, Zero);
     if (PICEnabled) {
       // With PIC, the first instruction is actually "GR+hi(&G)".
@@ -389,7 +390,7 @@
     SDOperand Lo = DAG.getNode(PPCISD::Lo, MVT::i32, GA, Zero);
     Lo = DAG.getNode(ISD::ADD, MVT::i32, Hi, Lo);
                                    
-    if (!GV->hasWeakLinkage() && !GV->isExternal())
+    if (!GV->hasWeakLinkage() && !GV->hasLinkOnceLinkage() && !GV->isExternal())
       return Lo;
 
     // If the global is weak or external, we have to go through the lazy






More information about the llvm-commits mailing list