ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverse

mappings, which could cause errors and assert-failures.  This patch fixes that,
adds a test, and refactors the global-mapping-removal code into a single place.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeffrey Yasskin
2009-10-09 22:10:27 +00:00
parent 769b7f8953
commit c89d27a440
3 changed files with 42 additions and 16 deletions

View File

@ -61,6 +61,9 @@ public:
getGlobalAddressReverseMap(const MutexGuard &) {
return GlobalAddressReverseMap;
}
// Returns the address ToUnmap was mapped to.
void *RemoveMapping(const MutexGuard &, const GlobalValue *ToUnmap);
};