summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 67d0dbdcc..e9facd5a9 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -3763,6 +3763,14 @@ std::ostream& operator<<(std::ostream& o, wasm::Module& module) {
return o;
}
+std::ostream& operator<<(std::ostream& o, wasm::Function& func) {
+ wasm::PrintSExpression print(o);
+ print.setMinify(false);
+ print.setDebugInfo(false);
+ print.visitFunction(&func);
+ return o;
+}
+
std::ostream& operator<<(std::ostream& o, wasm::Expression& expression) {
return wasm::printExpression(&expression, o);
}