summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/I64ToI32Lowering.cpp3
-rw-r--r--src/passes/LogExecution.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp
index 697df1eef..9e6fd106b 100644
--- a/src/passes/I64ToI32Lowering.cpp
+++ b/src/passes/I64ToI32Lowering.cpp
@@ -175,6 +175,9 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> {
}
void visitFunction(Function* func) {
+ if (func->imported()) {
+ return;
+ }
if (func->result == i64) {
func->result = i32;
// body may not have out param if it ends with control flow
diff --git a/src/passes/LogExecution.cpp b/src/passes/LogExecution.cpp
index 45a29eae9..65a802a2f 100644
--- a/src/passes/LogExecution.cpp
+++ b/src/passes/LogExecution.cpp
@@ -42,6 +42,9 @@ struct LogExecution : public WalkerPass<PostWalker<LogExecution>> {
}
void visitFunction(Function* curr) {
+ if (curr->imported()) {
+ return;
+ }
curr->body = makeLogCall(curr->body);
}