summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-04-12 09:31:02 -0700
committerGitHub <noreply@github.com>2020-04-12 09:31:02 -0700
commit3f3e17788c28d2cb069548acbe68d8095305f87d (patch)
tree514032302e0f9bfc8a00e4c240889bb0cb230ca3
parent6d4974135a9409a75822a0fe9c501676234c1f37 (diff)
downloadbinaryen-3f3e17788c28d2cb069548acbe68d8095305f87d.tar.gz
binaryen-3f3e17788c28d2cb069548acbe68d8095305f87d.tar.bz2
binaryen-3f3e17788c28d2cb069548acbe68d8095305f87d.zip
Legalize return_calls properly (#2752)
Fixes #2749
-rw-r--r--src/passes/LegalizeJSInterface.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index 61f3cfba5..659165306 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -167,8 +167,10 @@ struct LegalizeJSInterface : public Pass {
// call
return;
}
- replaceCurrent(Builder(*getModule())
- .makeCall(iter->second, curr->operands, curr->type));
+ replaceCurrent(
+ Builder(*getModule())
+ .makeCall(
+ iter->second, curr->operands, curr->type, curr->isReturn));
}
};