summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-09-30 12:33:30 -0700
committerGitHub <noreply@github.com>2024-09-30 12:33:30 -0700
commit2da69a84b69a316409d5af65f66443a27422a353 (patch)
treee88c183446b806b058e4460c45da8568bcdce6e5 /src/wasm.h
parentd8c1b0c0ceb4cc4eb59f3f3ab4840636c78e2a44 (diff)
downloadbinaryen-2da69a84b69a316409d5af65f66443a27422a353.tar.gz
binaryen-2da69a84b69a316409d5af65f66443a27422a353.tar.bz2
binaryen-2da69a84b69a316409d5af65f66443a27422a353.zip
[NFC] Print type names in more places when logging (#6975)
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm.h b/src/wasm.h
index e54d628bd..ede3e50c1 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -2401,6 +2401,9 @@ public:
// Utility for printing an expression with named types.
using ModuleExpression = std::pair<Module&, Expression*>;
+// Utility for printing an type with a name, if the module defines a name.
+using ModuleType = std::pair<Module&, Type>;
+
// Utility for printing only the top level of an expression. Named types will be
// used if `module` is non-null.
struct ShallowExpression {
@@ -2422,6 +2425,7 @@ 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);
+std::ostream& operator<<(std::ostream& o, wasm::ModuleType pair);
} // namespace std