Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's old

address from the reverse mapping, and add a test that this works now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78127 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeffrey Yasskin
2009-08-04 23:53:16 +00:00
parent 35d6c41fde
commit 0a962314fb
3 changed files with 96 additions and 5 deletions

View File

@ -179,7 +179,7 @@ void *ExecutionEngine::updateGlobalMapping(const GlobalValue *GV, void *Addr) {
}
if (!state.getGlobalAddressReverseMap(locked).empty())
state.getGlobalAddressReverseMap(locked).erase(Addr);
state.getGlobalAddressReverseMap(locked).erase(OldVal);
return OldVal;
}