Skip to content

Commit fd87188

Browse files
[wasm] Avoid repeated hash lookups (NFC) (#122626)
1 parent 43fdd6e commit fd87188

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lld/wasm/SymbolTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,8 +1009,8 @@ void SymbolTable::handleWeakUndefines() {
10091009
}
10101010

10111011
DefinedFunction *SymbolTable::createUndefinedStub(const WasmSignature &sig) {
1012-
if (stubFunctions.count(sig))
1013-
return stubFunctions[sig];
1012+
if (auto it = stubFunctions.find(sig); it != stubFunctions.end())
1013+
return it->second;
10141014
LLVM_DEBUG(dbgs() << "createUndefinedStub: " << toString(sig) << "\n");
10151015
auto *sym = reinterpret_cast<DefinedFunction *>(make<SymbolUnion>());
10161016
sym->isUsedInRegularObj = true;

0 commit comments

Comments
 (0)