mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-15 22:16:30 +00:00
[ExecutionEngine] Avoid repeated map lookups (NFC) (#135541)
This commit is contained in:
parent
62d2cc84ac
commit
4b4cd645a8
@ -475,8 +475,9 @@ Error DebugObjectManagerPlugin::notifyEmitted(
|
||||
FinalizePromise.set_value(MR.withResourceKeyDo([&](ResourceKey K) {
|
||||
assert(PendingObjs.count(&MR) && "We still hold PendingObjsLock");
|
||||
std::lock_guard<std::mutex> Lock(RegisteredObjsLock);
|
||||
RegisteredObjs[K].push_back(std::move(PendingObjs[&MR]));
|
||||
PendingObjs.erase(&MR);
|
||||
auto It = PendingObjs.find(&MR);
|
||||
RegisteredObjs[K].push_back(std::move(It->second));
|
||||
PendingObjs.erase(It);
|
||||
}));
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user