summaryrefslogtreecommitdiff
path: root/src/ir/module-utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/module-utils.cpp')
-rw-r--r--src/ir/module-utils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp
index 33f8ac926..84cd66c60 100644
--- a/src/ir/module-utils.cpp
+++ b/src/ir/module-utils.cpp
@@ -53,6 +53,10 @@ struct CodeScanner
void visitExpression(Expression* curr) {
if (auto* call = curr->dynCast<CallIndirect>()) {
counts.note(call->heapType);
+ } else if (auto* call = curr->dynCast<CallRef>()) {
+ if (call->isReturn && call->target->type.isFunction()) {
+ counts.note(call->target->type);
+ }
} else if (curr->is<RefNull>()) {
counts.note(curr->type);
} else if (auto* make = curr->dynCast<StructNew>()) {