Apply the 95471 fix to SelectionDAGBuilder as well;
authorDale Johannesen <dalej@apple.com>
Mon, 8 Feb 2010 21:53:27 +0000 (21:53 +0000)
committerDale Johannesen <dalej@apple.com>
Mon, 8 Feb 2010 21:53:27 +0000 (21:53 +0000)
we can get in here if FastISel gives up in a block.
(Actually the two copies of this need to be unified.  Later.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95579 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index 93ae043dbc14435c5f3c203b971d7481c2372b78..8b380c68c273f6fde1b70e952d5ddfaf754dc683 100644 (file)
@@ -3760,6 +3760,8 @@ SelectionDAGBuilder::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
 
     MDNode *Variable = DI.getVariable();
     Value *Address = DI.getAddress();
+    if (!Address)
+      return 0;
     if (BitCastInst *BCI = dyn_cast<BitCastInst>(Address))
       Address = BCI->getOperand(0);
     AllocaInst *AI = dyn_cast<AllocaInst>(Address);