Skip to content

Commit 8e010ac

Browse files
[WebAssembly] Avoid repeated hash lookups (NFC) (#112124)
1 parent a153a32 commit 8e010ac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,9 @@ Function *WebAssemblyLowerEmscriptenEHSjLj::getInvokeWrapper(CallBase *CI) {
575575
FunctionType *CalleeFTy = CI->getFunctionType();
576576

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

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

0 commit comments

Comments
 (0)