Skip to content

Commit

Permalink
[WebAssembly] Avoid repeated hash lookups (NFC) (#112124)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata authored Oct 13, 2024
1 parent a153a32 commit 8e010ac
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,9 @@ Function *WebAssemblyLowerEmscriptenEHSjLj::getInvokeWrapper(CallBase *CI) {
FunctionType *CalleeFTy = CI->getFunctionType();

std::string Sig = getSignature(CalleeFTy);
if (InvokeWrappers.contains(Sig))
return InvokeWrappers[Sig];
auto It = InvokeWrappers.find(Sig);
if (It != InvokeWrappers.end())
return It->second;

// Put the pointer to the callee as first argument
ArgTys.push_back(PointerType::getUnqual(CalleeFTy));
Expand Down

0 comments on commit 8e010ac

Please sign in to comment.