diff options
-rw-r--r-- | lib/Target/JSBackend/CallHandlers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/JSBackend/CallHandlers.h b/lib/Target/JSBackend/CallHandlers.h index 1f63ca9715..d01ae804fc 100644 --- a/lib/Target/JSBackend/CallHandlers.h +++ b/lib/Target/JSBackend/CallHandlers.h @@ -110,7 +110,7 @@ DEF_CALL_HANDLER(emscripten_preinvoke, { return "__THREW__ = 0"; }) DEF_CALL_HANDLER(emscripten_postinvoke, { - assert(InvokeState == 2); + assert(InvokeState == 1 || InvokeState == 2); // normally 2, but can be 1 if the call in between was optimized out InvokeState = 0; return getAssign(getJSName(CI), CI->getType()) + "__THREW__; __THREW__ = 0"; }) |