We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b06294 + fb9329c commit 3da4049Copy full SHA for 3da4049
llvm/lib/ExecutionEngine/JITLink/COFF_x86_64.cpp
@@ -235,12 +235,12 @@ class COFFLinkGraphLowering_x86_64 {
235
236
private:
237
orc::ExecutorAddr getSectionStart(Section &Sec) {
238
- if (!SectionStartCache.count(&Sec)) {
+ auto [It, Inserted] = SectionStartCache.try_emplace(&Sec);
239
+ if (Inserted) {
240
SectionRange Range(Sec);
- SectionStartCache[&Sec] = Range.getStart();
241
- return Range.getStart();
+ It->second = Range.getStart();
242
}
243
- return SectionStartCache[&Sec];
+ return It->second;
244
245
246
GetImageBaseSymbol GetImageBase;
0 commit comments