[PATCH] D115893: [WebAssembly] Support clang -fwasm-exceptions for bitcode
Derek Schuff via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 16 15:29:36 PST 2021
dschuff accepted this revision.
dschuff added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp:37
-// Emscripten's asm.js-style exception handling
-cl::opt<bool>
- WasmEnableEmEH("enable-emscripten-cxx-exceptions",
- cl::desc("WebAssembly Emscripten-style exception handling"),
- cl::init(false));
-
-// Emscripten's asm.js-style setjmp/longjmp handling
-cl::opt<bool> WasmEnableEmSjLj(
- "enable-emscripten-sjlj",
- cl::desc("WebAssembly Emscripten-style setjmp/longjmp handling"),
- cl::init(false));
-
-// Exception handling using wasm EH instructions
-cl::opt<bool> WasmEnableEH("wasm-enable-eh",
- cl::desc("WebAssembly exception handling"),
- cl::init(false));
-
-// setjmp/longjmp handling using wasm EH instrutions
-cl::opt<bool> WasmEnableSjLj("wasm-enable-sjlj",
- cl::desc("WebAssembly setjmp/longjmp handling"),
- cl::init(false));
+extern cl::opt<bool> WasmEnableEmEH; // asm.js-style EH
+extern cl::opt<bool> WasmEnableEmSjLj; // asm.js-style SjLJ
----------------
We could put these declarations in WebAssemblyUtilities.h; then they wouldn't have to be duplicated here and in WebAssemblyMCAsmInfo.cpp
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp:357
+ // Before checking, we make sure TargetOptions.ExceptionModel is the same as
+ // MCAsmInfo.ExceptionsType. Normally when these have to be the same, because
+ // clang stores the exception model info in LangOptions, which is later
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115893/new/
https://reviews.llvm.org/D115893
More information about the llvm-commits
mailing list