summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
index 743d5e2307c..cb48d6cb230 100644
--- a/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
+++ b/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
@@ -381,6 +381,9 @@ private:
std::shared_ptr<JITSymbolResolver> ClientResolver;
Mangler Mang;
+ // IMPORTANT: ShouldDelete *must* come before LocalModules: The shared_ptr
+ // delete blocks in LocalModules refer to the ShouldDelete map, so
+ // LocalModules needs to be destructed before ShouldDelete.
std::map<Module*, bool> ShouldDelete;
std::vector<std::shared_ptr<Module>> LocalModules;
OpenPOWER on IntegriCloud