@@ -318,8 +318,9 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass {
318
318
Function *ResumeF = nullptr ; // __resumeException() (Emscripten)
319
319
Function *EHTypeIDF = nullptr ; // llvm.eh.typeid.for() (intrinsic)
320
320
Function *EmLongjmpF = nullptr ; // emscripten_longjmp() (Emscripten)
321
- Function *SaveSetjmpF = nullptr ; // saveSetjmp() (Emscripten)
322
- Function *TestSetjmpF = nullptr ; // testSetjmp() (Emscripten)
321
+ Function *SaveSetjmpF = nullptr ; // saveSetjmp()/__wasm_setjmp() (Emscripten)
322
+ Function *TestSetjmpF =
323
+ nullptr ; // testSetjmp()/__wasm_setjmp_test() (Emscripten)
323
324
Function *WasmLongjmpF = nullptr ; // __wasm_longjmp() (Emscripten)
324
325
Function *CatchF = nullptr ; // wasm.catch() (intrinsic)
325
326
@@ -1019,14 +1020,14 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) {
1019
1020
Type *Int32Ty = IRB.getInt32Ty ();
1020
1021
1021
1022
if (EnableWasmSjLj) {
1022
- // Register saveSetjmp function
1023
+ // Register __wasm_setjmp function
1023
1024
FunctionType *SetjmpFTy = SetjmpF->getFunctionType ();
1024
1025
FunctionType *FTy = FunctionType::get (
1025
1026
IRB.getVoidTy (), {SetjmpFTy->getParamType (0 ), Int32Ty, Int32PtrTy},
1026
1027
false );
1027
1028
SaveSetjmpF = getEmscriptenFunction (FTy, " __wasm_setjmp" , &M);
1028
1029
1029
- // Register testSetjmp function
1030
+ // Register __wasm_setjmp_test function
1030
1031
FTy = FunctionType::get (Int32Ty, {Int32PtrTy, Int32PtrTy}, false );
1031
1032
TestSetjmpF = getEmscriptenFunction (FTy, " __wasm_setjmp_test" , &M);
1032
1033
} else {
0 commit comments