[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

Heejin Ahn via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 8 23:26:23 PST 2024


================
@@ -54,6 +54,9 @@ cl::opt<bool>
 // setjmp/longjmp handling using wasm EH instrutions
 cl::opt<bool> WebAssembly::WasmEnableSjLj(
     "wasm-enable-sjlj", cl::desc("WebAssembly setjmp/longjmp handling"));
+cl::opt<bool> WebAssembly::WasmEnableAltSjLj(
+    "experimental-wasm-enable-alt-sjlj",
+    cl::desc("Use experimental alternate ABI for --wasm-enable-sjlj"));
----------------
aheejin wrote:

```suggestion
cl::opt<bool> WebAssembly::WasmEnableExperimentalNewSjLj(
    "wasm-enable-experimental-new-sjlj",
    cl::desc("Use experimental new ABI for -wasm-enable-sjlj"));
```

I've been trying to make all Wasm related option variable names start with `Wasm`. Also, if we are to replace the current impl with this, how about just 'new' than 'alt', which sounds like we are planning to keep both?

If we are to change this, we have to fix other places that includes either of `WasmEnableAltSjLj` and `experimental-wasm-enable-alt-sjlj` as well.

https://github.com/llvm/llvm-project/pull/84137


More information about the cfe-commits mailing list