mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
Do not dereference end iterators. It's really bad for the asmwriter's health.
This possibly fixes PR370 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f405280acb
commit
d1cd328560
@ -1324,7 +1324,10 @@ int SlotMachine::getSlot(const Value *V) {
|
|||||||
// Return the slot number as the module's contribution to
|
// Return the slot number as the module's contribution to
|
||||||
// the type plane plus the index in the function's contribution
|
// the type plane plus the index in the function's contribution
|
||||||
// to the type plane.
|
// to the type plane.
|
||||||
return MI->second.next_slot + FVI->second;
|
if (MI != mMap.end())
|
||||||
|
return MI->second.next_slot + FVI->second;
|
||||||
|
else
|
||||||
|
return FVI->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user