Skip to content

Commit ff285f7

Browse files
committed
rename abi functions
1 parent 2cdc54e commit ff285f7

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@
278278
/// to identify the function invocation using alloc().
279279
///
280280
/// - We use simpler ABI functions with different names.
281-
/// (prefixed with "__wasm_sjlj_")
282281
///
283282
///===----------------------------------------------------------------------===//
284283

@@ -633,7 +632,7 @@ static bool canLongjmp(const Value *Callee) {
633632
// There are functions in Emscripten's JS glue code or compiler-rt
634633
if (CalleeName == "__resumeException" || CalleeName == "llvm_eh_typeid_for" ||
635634
CalleeName == "saveSetjmp" || CalleeName == "testSetjmp" ||
636-
CalleeName == "__wasm_sjlj_setjmp" || CalleeName == "__wasm_sjlj_test" ||
635+
CalleeName == "__wasm_setjmp" || CalleeName == "__wasm_setjmp_test" ||
637636
CalleeName == "getTempRet0" || CalleeName == "setTempRet0")
638637
return false;
639638

@@ -1014,11 +1013,7 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) {
10141013
// Register __wasm_longjmp function, which calls __builtin_wasm_longjmp.
10151014
FunctionType *FTy = FunctionType::get(
10161015
IRB.getVoidTy(), {Int8PtrTy, IRB.getInt32Ty()}, false);
1017-
if (EnableWasmSjLj) {
1018-
WasmLongjmpF = getEmscriptenFunction(FTy, "__wasm_sjlj_longjmp", &M);
1019-
} else {
1020-
WasmLongjmpF = getEmscriptenFunction(FTy, "__wasm_longjmp", &M);
1021-
}
1016+
WasmLongjmpF = getEmscriptenFunction(FTy, "__wasm_longjmp", &M);
10221017
WasmLongjmpF->addFnAttr(Attribute::NoReturn);
10231018
}
10241019

@@ -1033,11 +1028,11 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) {
10331028
FunctionType *FTy = FunctionType::get(
10341029
IRB.getVoidTy(), {SetjmpFTy->getParamType(0), Int32Ty, Int32PtrTy},
10351030
false);
1036-
SaveSetjmpF = getEmscriptenFunction(FTy, "__wasm_sjlj_setjmp", &M);
1031+
SaveSetjmpF = getEmscriptenFunction(FTy, "__wasm_setjmp", &M);
10371032

10381033
// Register testSetjmp function
10391034
FTy = FunctionType::get(Int32Ty, {Int32PtrTy, Int32PtrTy}, false);
1040-
TestSetjmpF = getEmscriptenFunction(FTy, "__wasm_sjlj_test", &M);
1035+
TestSetjmpF = getEmscriptenFunction(FTy, "__wasm_setjmp_test", &M);
10411036
} else {
10421037
// Register saveSetjmp function
10431038
FunctionType *SetjmpFTy = SetjmpF->getFunctionType();

0 commit comments

Comments
 (0)