summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2017-08-31 01:09:56 +0000
committerLang Hames <lhames@gmail.com>2017-08-31 01:09:56 +0000
commit1aad27e17bc40273849802240439f6e7d49ac81d (patch)
tree54e8993d588f531988dbd445acec4ee5d216565c /llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
parent415f15c5e206127c57fe7996014569dae0f1419f (diff)
downloadbcm5719-llvm-1aad27e17bc40273849802240439f6e7d49ac81d.tar.gz
bcm5719-llvm-1aad27e17bc40273849802240439f6e7d49ac81d.zip
[Orc] Add a comment about member variable dependencies to OrcMCJITReplacement.
The comment explains the reason behind the change in member variable order in r312086. Thanks to Philip Reames for the suggestion. llvm-svn: 312205
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h')
-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