From a130a511f46e0e8ed73a00a945822c87fea35def Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 15 Aug 2009 21:07:49 +0000 Subject: [PATCH] Don't try to get the context from an erased Instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79134 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/PredicateSimplifier.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp index 8332f5667f2..4bcc339464a 100644 --- a/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -1311,7 +1311,7 @@ namespace { TerminatorInst *TI = BB->getTerminator(); TI->replaceAllUsesWith(UndefValue::get(TI->getType())); TI->eraseFromParent(); - new UnreachableInst(TI->getContext(), BB); + new UnreachableInst(BB->getContext(), BB); ++NumBlocks; modified = true; } -- 2.34.1