From 76efb34b99a7a49127a2877e45cf873e5b5fbcad Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Tue, 4 Aug 2009 23:53:16 +0000 Subject: 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 --- lib/ExecutionEngine/ExecutionEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp') diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 8a999da3d3..e827d36f86 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -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; } -- cgit v1.2.3