summaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-13 16:22:32 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-13 16:22:32 +0000
commit0982d081056f64d7245ba26368d20de33e206ff9 (patch)
tree71927a23fcb7b0a50bccb3a5e901ef3e7251b710 /include/llvm/ExecutionEngine
parent4af3da6e6b5607e4ec19c9b3f995feeb6fb70ae5 (diff)
downloadllvm-0982d081056f64d7245ba26368d20de33e206ff9.tar.gz
llvm-0982d081056f64d7245ba26368d20de33e206ff9.tar.bz2
llvm-0982d081056f64d7245ba26368d20de33e206ff9.tar.xz
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
Diffstat (limited to 'include/llvm/ExecutionEngine')
-rw-r--r--include/llvm/ExecutionEngine/ExecutionEngine.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h
index dd83a8a522..1ede32dd92 100644
--- a/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/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) {