From: Chris Lattner Date: Sat, 27 May 2006 17:28:13 +0000 (+0000) Subject: Fix some regression from the inliner patch I committed last night. This fixes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8d8d6530b13ea092a69f7fdc89786e22c0f96827;p=oota-llvm.git Fix some regression from the inliner patch I committed last night. This fixes ldecod, lencod, and SPASS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28523 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 623da058db9..dd1b31bde5a 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -311,7 +311,7 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, for (; (PN = dyn_cast(I)); ++I) { for (unsigned pred = 0, e = NumPreds; pred != e; ++pred) { if (BasicBlock *MappedBlock = - cast(ValueMap[PN->getIncomingBlock(pred)])) { + cast_or_null(ValueMap[PN->getIncomingBlock(pred)])) { Value *InVal = MapValue(PN->getIncomingValue(pred), ValueMap); assert(InVal && "Unknown input value?"); PN->setIncomingValue(pred, InVal);