summaryrefslogtreecommitdiff
path: root/src/tools/wasm-as.cpp
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2017-11-01 23:46:07 +0100
committerAlon Zakai <alonzakai@gmail.com>2017-11-01 15:46:07 -0700
commitd38eeadc55a4b3a97b2879ba3d13a50224c28df6 (patch)
tree3e7c54475a3b3e155c258b11d32ecda09230501e /src/tools/wasm-as.cpp
parentd328024d8c435379f248b0a257df2aedbe1c1b84 (diff)
downloadbinaryen-d38eeadc55a4b3a97b2879ba3d13a50224c28df6.tar.gz
binaryen-d38eeadc55a4b3a97b2879ba3d13a50224c28df6.tar.bz2
binaryen-d38eeadc55a4b3a97b2879ba3d13a50224c28df6.zip
Restrict validation output to just validation errors in the API (#1253)
Do not print the entire and possibly very large module when validation fails. Leave printing to tools using the validator, instead of always doing it in the validator where it can't be overridden.
Diffstat (limited to 'src/tools/wasm-as.cpp')
-rw-r--r--src/tools/wasm-as.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/wasm-as.cpp b/src/tools/wasm-as.cpp
index d456f43fd..0e053e05a 100644
--- a/src/tools/wasm-as.cpp
+++ b/src/tools/wasm-as.cpp
@@ -94,6 +94,7 @@ int main(int argc, const char *argv[]) {
if (options.debug) std::cerr << "Validating..." << std::endl;
if (!wasm::WasmValidator().validate(wasm, Feature::All,
WasmValidator::Globally | (options.extra["validate"] == "web" ? WasmValidator::Web : 0))) {
+ WasmPrinter::printModule(&wasm);
Fatal() << "Error: input module is not valid.\n";
}
}