From 6a85be25a4d67e75e088e73a181fd2cde7b98843 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Tue, 19 Apr 2011 15:23:29 +0000 Subject: Trivial simplification. llvm-svn: 129759 --- llvm/lib/Transforms/Utils/Local.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Utils/Local.cpp') diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index cc508a47de3..614e4114e9c 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -68,8 +68,7 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB) { // Let the basic block know that we are letting go of it. Based on this, // it will adjust it's PHI nodes. - assert(BI->getParent() && "Terminator not inserted in block!"); - OldDest->removePredecessor(BI->getParent()); + OldDest->removePredecessor(BB); // Replace the conditional branch with an unconditional one. BranchInst::Create(Destination, BI); -- cgit v1.2.3