diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-27 17:28:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-27 17:28:13 +0000 |
commit | 8d8d6530b13ea092a69f7fdc89786e22c0f96827 (patch) | |
tree | 5df123c5570b6157bb43d570a9c1dd697fcb8e5b /lib/Transforms/Utils/CloneFunction.cpp | |
parent | c83769ae33024fb86ff63ab46f75a2bfed7975d3 (diff) |
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
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | lib/Transforms/Utils/CloneFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<PHINode>(I)); ++I) { for (unsigned pred = 0, e = NumPreds; pred != e; ++pred) { if (BasicBlock *MappedBlock = - cast<BasicBlock>(ValueMap[PN->getIncomingBlock(pred)])) { + cast_or_null<BasicBlock>(ValueMap[PN->getIncomingBlock(pred)])) { Value *InVal = MapValue(PN->getIncomingValue(pred), ValueMap); assert(InVal && "Unknown input value?"); PN->setIncomingValue(pred, InVal); |