[llvm] r312205 - [Orc] Add a comment about member variable dependencies to OrcMCJITReplacement.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 30 18:09:56 PDT 2017


Author: lhames
Date: Wed Aug 30 18:09:56 2017
New Revision: 312205

URL: http://llvm.org/viewvc/llvm-project?rev=312205&view=rev
Log:
[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.


Modified:
    llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h

Modified: llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h?rev=312205&r1=312204&r2=312205&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h Wed Aug 30 18:09:56 2017
@@ -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;
 




More information about the llvm-commits mailing list