File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -635,11 +635,12 @@ void LTO::addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms,
635635 SymbolResolution Res = *ResI++;
636636
637637 StringRef SymbolName = Sym.getName ();
638+ auto [It, Inserted] = GlobalResolutions->try_emplace (SymbolName);
638639 // Keep copies of symbols if the client of LTO says so.
639- if (GlobalResolutionSymbolSaver && !GlobalResolutions-> contains (SymbolName) )
640+ if (GlobalResolutionSymbolSaver && Inserted )
640641 SymbolName = GlobalResolutionSymbolSaver->save (SymbolName);
641642
642- auto &GlobalRes = (*GlobalResolutions)[SymbolName] ;
643+ auto &GlobalRes = It-> second ;
643644 GlobalRes.UnnamedAddr &= Sym.isUnnamedAddr ();
644645 if (Res.Prevailing ) {
645646 assert (!GlobalRes.Prevailing &&
You can’t perform that action at this time.
0 commit comments