[PATCH] D66356: [WebAssembly] Forbid use of EM_ASM with setjmp/longjmp

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 11:00:02 PDT 2019


tlively added inline comments.


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp:550
+  Function *EmAsmConstAsyncMainF =
+      M.getFunction("emscripten_asm_const_async_on_main_thread");
+
----------------
Where does this list of functions come from? How do we know it's exhaustive?


================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp:554
+         Callee == EmAsmConstIntSyncMainF ||
+         Callee == EmAsmConstDoubleSyncMainF || Callee == EmAsmConstAsyncMainF;
+}
----------------
Maybe use `std::any_of` over an array of the function names as plain strings to reduce repetition?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66356/new/

https://reviews.llvm.org/D66356





More information about the llvm-commits mailing list