From 0982d081056f64d7245ba26368d20de33e206ff9 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 13 Dec 2004 16:22:32 +0000 Subject: [PATCH] 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 --- include/llvm/ExecutionEngine/ExecutionEngine.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/ExecutionEngine/ExecutionEngine.h b/include/llvm/ExecutionEngine/ExecutionEngine.h index dd83a8a5228..1ede32dd926 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) { -- 2.34.1