The comment explains the reason behind the change in member variable order in
r312086.
Thanks to Philip Reames for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312205
91177308-0d34-0410-b5e6-
96231b3b80d8
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;