================
@@ -1060,8 +1060,9 @@ Expected<bool> getSymbolsFromBitcode(MemoryBufferRef
Buffer, OffloadKind Kind,
if (Sym.isFormatSpecific() || !Sym.isGlobal())
continue;
- bool NewSymbol = Syms.count(Sym.getName()) == 0;
- auto OldSym = NewSymbol ? Sym_None : Syms[Sym.getName()];
+ auto It = Syms.find(Sym.getName());
+ bool NewSymbol = It == Syms.end();
+ auto OldSym = NewSymbol ? Sym_None : It->second;
----------------
nikic wrote:
Could also reduce this to `Syms.lookup(Sym.getName())`, but maybe that's less
explicit...
https://github.com/llvm/llvm-project/pull/127443
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits