Skip to content

Commit 8b8778b

Browse files
[WebAssembly] Use heterogenous lookups with std::set (NFC) (#114930)
1 parent 3297858 commit 8b8778b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass {
318318
// Map of <function signature string, invoke_ wrappers>
319319
StringMap<Function *> InvokeWrappers;
320320
// Set of allowed function names for exception handling
321-
std::set<std::string> EHAllowlistSet;
321+
std::set<std::string, std::less<>> EHAllowlistSet;
322322
// Functions that contains calls to setjmp
323323
SmallPtrSet<Function *, 8> SetjmpUsers;
324324

@@ -349,8 +349,8 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass {
349349

350350
bool areAllExceptionsAllowed() const { return EHAllowlistSet.empty(); }
351351
bool supportsException(const Function *F) const {
352-
return EnableEmEH && (areAllExceptionsAllowed() ||
353-
EHAllowlistSet.count(std::string(F->getName())));
352+
return EnableEmEH &&
353+
(areAllExceptionsAllowed() || EHAllowlistSet.count(F->getName()));
354354
}
355355
void replaceLongjmpWith(Function *LongjmpF, Function *NewF);
356356

0 commit comments

Comments
 (0)