diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Print.cpp | 8 | ||||
-rw-r--r-- | src/wasm.h | 1 |
2 files changed, 9 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); } diff --git a/src/wasm.h b/src/wasm.h index afb824bdd..c059009b6 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -2330,6 +2330,7 @@ template<> struct hash<wasm::Address> { }; std::ostream& operator<<(std::ostream& o, wasm::Module& module); +std::ostream& operator<<(std::ostream& o, wasm::Function& func); std::ostream& operator<<(std::ostream& o, wasm::Expression& expression); std::ostream& operator<<(std::ostream& o, wasm::ModuleExpression pair); std::ostream& operator<<(std::ostream& o, wasm::ShallowExpression expression); |