================ @@ -999,25 +1002,42 @@ 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); + } else { + WasmLongjmpF = getEmscriptenFunction(FTy, "__wasm_longjmp", &M); + } WasmLongjmpF->addFnAttr(Attribute::NoReturn); } if (SetjmpF) { Type *Int8PtrTy = IRB.getPtrTy(); Type *Int32PtrTy = IRB.getPtrTy(); Type *Int32Ty = IRB.getInt32Ty(); - // Register saveSetjmp function - FunctionType *SetjmpFTy = SetjmpF->getFunctionType(); - FunctionType *FTy = FunctionType::get( - Int32PtrTy, - {SetjmpFTy->getParamType(0), Int32Ty, Int32PtrTy, Int32Ty}, false); - SaveSetjmpF = getEmscriptenFunction(FTy, "saveSetjmp", &M); // Register testSetjmp function ---------------- yamt wrote:
oops. fixed. thank you. https://github.com/llvm/llvm-project/pull/84137 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits