From 8d8d6530b13ea092a69f7fdc89786e22c0f96827 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 27 May 2006 17:28:13 +0000 Subject: 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 --- lib/Transforms/Utils/CloneFunction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Transforms/Utils/CloneFunction.cpp') diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 623da058db..dd1b31bde5 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); -- cgit v1.2.3