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
This commit is contained in:
Chris Lattner 2006-05-27 17:28:13 +00:00
parent c83769ae33
commit 8d8d6530b1

View File

@ -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);