1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Handle instructions in the map, but that map to a null pointer.

This unbreaks smg2000.

llvm-svn: 29127
This commit is contained in:
Chris Lattner 2006-07-12 21:37:11 +00:00
parent d4000ea452
commit b77e687f6f

View File

@ -157,7 +157,8 @@ static void UpdateCallGraphAfterInlining(const Function *Caller,
const Instruction *OrigCall = I->first.getInstruction();
std::map<const Value*, Value*>::iterator VMI = ValueMap.find(OrigCall);
if (VMI != ValueMap.end()) { // Only copy the edge if the call was inlined!
// Only copy the edge if the call was inlined!
if (VMI != ValueMap.end() && VMI->second) {
// If the call was inlined, but then constant folded, there is no edge to
// add. Check for this case.
if (Instruction *NewCall = dyn_cast<Instruction>(VMI->second))