Unbreak ppc debug support.
authorEvan Cheng <evan.cheng@apple.com>
Sat, 2 Feb 2008 05:06:29 +0000 (05:06 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sat, 2 Feb 2008 05:06:29 +0000 (05:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46665 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCISelLowering.cpp

index 79fc16bfcacac365d9dc3898eb6491ccf23c7956..e17f82d6aaa50564f44fa89985b734ef2ddeef98 100644 (file)
@@ -1076,6 +1076,9 @@ static SDOperand LowerGlobalAddress(SDOperand Op, SelectionDAG &DAG) {
   GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
   GlobalValue *GV = GSDN->getGlobal();
   SDOperand GA = DAG.getTargetGlobalAddress(GV, PtrVT, GSDN->getOffset());
+  // If it's a debug information descriptor, don't mess with it.
+  if (DAG.isVerifiedDebugInfoDesc(Op))
+    return GA;
   SDOperand Zero = DAG.getConstant(0, PtrVT);
   
   const TargetMachine &TM = DAG.getTarget();