diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 16:22:32 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-13 16:22:32 +0000 |
commit | eb21d18b36e749bd55eb970fef0c73d42f72d320 (patch) | |
tree | 9e8c139836a80bda0ae4b8d0ecc7bc2132210f26 | |
parent | 53bd3d0b1a0ae5550578c7b341a7f55e620d8773 (diff) | |
download | bcm5719-llvm-eb21d18b36e749bd55eb970fef0c73d42f72d320.tar.gz bcm5719-llvm-eb21d18b36e749bd55eb970fef0c73d42f72d320.zip |
Add a convenience function for clearing the two global areas.
Patch contributed by Morten Ofsted.
llvm-svn: 18890
-rw-r--r-- | llvm/include/llvm/ExecutionEngine/ExecutionEngine.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h index dd83a8a5228..1ede32dd926 100644 --- a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h +++ b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h @@ -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) { |