Add a convenience function for clearing the two global areas.

Patch contributed by Morten Ofsted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18890 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-12-13 16:22:32 +00:00
parent 4af3da6e6b
commit 0982d08105

View File

@ -93,6 +93,13 @@ public:
}
}
/// clearAllGlobalMappings - Clear all global mappings and start over again
/// use in dynamic compilation scenarios when you want to move globals
void clearAllGlobalMappings() {
GlobalAddressMap.clear();
GlobalAddressReverseMap.clear();
}
/// updateGlobalMapping - Replace an existing mapping for GV with a new
/// address. This updates both maps as required.
void updateGlobalMapping(const GlobalValue *GV, void *Addr) {