From 10b929720a8701ef2a960f5b45e39d7a999cca41 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 17 Feb 2016 16:53:14 -0800 Subject: overload wasm printing in std namespace --- src/wasm-printing.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/wasm-printing.h b/src/wasm-printing.h index d7868d52c..6d8ed7c8a 100644 --- a/src/wasm-printing.h +++ b/src/wasm-printing.h @@ -33,5 +33,17 @@ extern std::ostream& printWasm(Expression* expression, std::ostream& o); } +namespace std { + +std::ostream& operator<<(std::ostream& o, wasm::Module* module) { + return wasm::printWasm(module, o); +} + +std::ostream& operator<<(std::ostream& o, wasm::Expression* expression) { + return wasm::printWasm(expression, o); +} + +} + #endif -- cgit v1.2.3