diff options
author | Alon Zakai <azakai@google.com> | 2023-05-17 09:42:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 16:42:58 +0000 |
commit | 071431bac6269ff8bcfa95194c94446314a2394d (patch) | |
tree | 455511db1f4c934d205b9b55ba3e568057e52dce /src | |
parent | aab5f274773f4e1567b02e6950b4d22119cf801d (diff) | |
download | binaryen-071431bac6269ff8bcfa95194c94446314a2394d.tar.gz binaryen-071431bac6269ff8bcfa95194c94446314a2394d.tar.bz2 binaryen-071431bac6269ff8bcfa95194c94446314a2394d.zip |
Print function types on function imports in the text format (#5727)
The function type should be printed there just like for non-imported
functions.
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Print.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 2ebf73638..0d74d43f1 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2953,6 +2953,10 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> { } if (name.is()) { o << " $" << name; + if (currModule && currModule->features.hasGC()) { + o << " (type "; + printHeapType(o, curr, currModule) << ')'; + } } if (sig.params.size() > 0) { o << maybeSpace; |