Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit f3dfdd1

Browse files
authored
Add a declare for testSetjmp and longjmp when needed, do not depend on library.js (#160)
1 parent dfcb07a commit f3dfdd1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Target/JSBackend/CallHandlers.h

+2
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ DEF_CALL_HANDLER(emscripten_check_longjmp, {
227227
std::string Threw = getValueAsStr(CI->getOperand(0));
228228
std::string Target = getJSName(CI);
229229
std::string Assign = getAssign(CI);
230+
Declares.insert("testSetjmp");
231+
Declares.insert("longjmp");
230232
return "if (((" + Threw + "|0) != 0) & ((threwValue|0) != 0)) { " +
231233
Assign + "_testSetjmp(HEAP32[" + Threw + ">>2]|0, _setjmpTable|0, _setjmpTableSize|0)|0; " +
232234
"if ((" + Target + "|0) == 0) { _longjmp(" + Threw + "|0, threwValue|0); } " + // rethrow

0 commit comments

Comments
 (0)