From f9e7f9684b92c2ecedf68e8b2b234c53b06ce60f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 4 Nov 2024 10:09:12 -0800 Subject: [PATCH] [WebAssembly] Use heterogenous lookups with std::set (NFC) --- .../Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp index 493e391964ac1..5aef016720cf4 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp @@ -318,7 +318,7 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass { // Map of StringMap InvokeWrappers; // Set of allowed function names for exception handling - std::set EHAllowlistSet; + std::set> EHAllowlistSet; // Functions that contains calls to setjmp SmallPtrSet SetjmpUsers; @@ -349,8 +349,8 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass { bool areAllExceptionsAllowed() const { return EHAllowlistSet.empty(); } bool supportsException(const Function *F) const { - return EnableEmEH && (areAllExceptionsAllowed() || - EHAllowlistSet.count(std::string(F->getName()))); + return EnableEmEH && + (areAllExceptionsAllowed() || EHAllowlistSet.count(F->getName())); } void replaceLongjmpWith(Function *LongjmpF, Function *NewF);