From 8ac38f2a616d303423e66023d2d2a6ff96c5040a Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Mon, 8 Feb 2010 21:53:27 +0000 Subject: [PATCH] Apply the 95471 fix to SelectionDAGBuilder as well; 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 93ae043dbc1..8b380c68c27 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -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(Address)) Address = BCI->getOperand(0); AllocaInst *AI = dyn_cast(Address); -- 2.34.1