File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -81,13 +81,17 @@ struct __WasmLongjmpArgs {
81
81
82
82
thread_local struct __WasmLongjmpArgs __wasm_longjmp_args ;
83
83
84
+ // llvm uses `1` for the __c_longjmp tag.
85
+ // See https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/CodeGen/WasmEHFuncInfo.h
86
+ #define C_LONGJMP 1
87
+
84
88
// Wasm EH allows us to throw and catch multiple values, but that requires
85
89
// multivalue support in the toolchain, whch is not reliable at the time.
86
90
// TODO Consider switching to throwing two values at the same time later.
87
91
void __wasm_longjmp (void * env , int val ) {
88
92
__wasm_longjmp_args .env = env ;
89
93
__wasm_longjmp_args .val = val ;
90
- __builtin_wasm_throw (1 , & __wasm_longjmp_args );
94
+ __builtin_wasm_throw (C_LONGJMP , & __wasm_longjmp_args );
91
95
}
92
96
93
97
#endif
You can’t perform that action at this time.
0 commit comments