Skip to content

Commit 67d92cf

Browse files
[ExecutionEngine] Avoid repeated hash lookups (NFC) (#128827)
1 parent e49c8d5 commit 67d92cf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,8 @@ COFFPlatform::buildJDDepMap(JITDylib &JD) {
484484
}
485485
DM.push_back(KV.first);
486486
// Push unvisited entry.
487-
if (!JDDepMap.count(KV.first)) {
487+
if (JDDepMap.try_emplace(KV.first).second)
488488
Worklist.push_back(KV.first);
489-
JDDepMap[KV.first] = {};
490-
}
491489
}
492490
});
493491
}

0 commit comments

Comments
 (0)