Don't crash on multiple return value with no obvious inserted value.

Fixes PR4314.

llvm-svn: 73007
This commit is contained in:
Nick Lewycky 2009-06-06 23:13:08 +00:00
parent 770f633389
commit 1a54547335

View File

@ -639,8 +639,8 @@ void SCCPSolver::visitReturnInst(ReturnInst &I) {
DenseMap<std::pair<Function*, unsigned>, LatticeVal>::iterator
It = TrackedMultipleRetVals.find(std::make_pair(F, i));
if (It == TrackedMultipleRetVals.end()) break;
Value *Val = FindInsertedValue(I.getOperand(0), i);
mergeInValue(It->second, F, getValueState(Val));
if (Value *Val = FindInsertedValue(I.getOperand(0), i))
mergeInValue(It->second, F, getValueState(Val));
}
}
}