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

Fixes PR4314.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73007 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky 2009-06-06 23:13:08 +00:00
parent b9a4cacc91
commit d7f20b6b98

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