Skip to content

Commit 2de7b6c

Browse files
[ExecutionEngine] Use DenseMap::insert_range (NFC) (#133847)
We can safely switch to insert_range here because LR starts out empty. Also, *Result is a DenseMap, so we know that the keys are unique.
1 parent 4d68cf3 commit 2de7b6c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/ExecutionEngine/Orc/LinkGraphLinkingLayer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ class LinkGraphLinkingLayer::JITLinkCtx final : public JITLinkContext {
108108
LookupContinuation->run(Result.takeError());
109109
else {
110110
AsyncLookupResult LR;
111-
for (auto &KV : *Result)
112-
LR[KV.first] = KV.second;
111+
LR.insert_range(*Result);
113112
LookupContinuation->run(std::move(LR));
114113
}
115114
};

0 commit comments

Comments
 (0)