[llvm-commits] [llvm] r79134 - /llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Aug 15 14:07:49 PDT 2009
Author: d0k
Date: Sat Aug 15 16:07:49 2009
New Revision: 79134
URL: http://llvm.org/viewvc/llvm-project?rev=79134&view=rev
Log:
Don't try to get the context from an erased Instruction.
Modified:
llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp?rev=79134&r1=79133&r2=79134&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/PredicateSimplifier.cpp Sat Aug 15 16:07:49 2009
@@ -1311,7 +1311,7 @@
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;
}
More information about the llvm-commits
mailing list