Skip to content

Commit

Permalink
[wasm] Avoid repeated hash lookups (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Jan 12, 2025
1 parent 5e4b41c commit e684090
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lld/wasm/SymbolTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,8 @@ void SymbolTable::handleWeakUndefines() {
}

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

0 comments on commit e684090

Please sign in to comment.