[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)
YAMAMOTO Takashi via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 10 18:08:38 PDT 2024
================
@@ -999,25 +1017,43 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) {
// Register __wasm_longjmp function, which calls __builtin_wasm_longjmp.
FunctionType *FTy = FunctionType::get(
IRB.getVoidTy(), {Int8PtrTy, IRB.getInt32Ty()}, false);
- WasmLongjmpF = getEmscriptenFunction(FTy, "__wasm_longjmp", &M);
+ if (EnableWasmAltSjLj) {
+ WasmLongjmpF = getEmscriptenFunction(FTy, "__wasm_sjlj_longjmp", &M);
----------------
yamt wrote:
i wanted to have a common prefix for this set of api. (`__wasm_sjlj_`)
what's your suggestion for `testSetjmp`?
```
saveSetjmp -> __wasm_setjmp?
testSetjmp -> ???
getTempRet0 -> (removed)
__wasm_longjmp -> keep it
```
https://github.com/llvm/llvm-project/pull/84137
More information about the llvm-commits
mailing list