mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Attempt to fix Orc JIT test timeouts
I think there are some destruction ordering issues here. The ShouldDelete map seems to be getting destroyed before the shared_ptr deleter lambda accesses it. In any case, this avoids inserting elements into the map during shutdown. llvm-svn: 306736
This commit is contained in:
parent
bc16c3ba43
commit
15437b120c
@ -193,9 +193,9 @@ public:
|
||||
}
|
||||
auto *MPtr = M.release();
|
||||
ShouldDelete[MPtr] = true;
|
||||
auto Deleter =
|
||||
[this](Module *Mod) {
|
||||
if (ShouldDelete[Mod])
|
||||
auto Deleter = [this](Module *Mod) {
|
||||
auto I = ShouldDelete.find(Mod);
|
||||
if (I != ShouldDelete.end() && I->second)
|
||||
delete Mod;
|
||||
};
|
||||
LocalModules.push_back(std::shared_ptr<Module>(MPtr, std::move(Deleter)));
|
||||
|
Loading…
x
Reference in New Issue
Block a user