summaryrefslogtreecommitdiff
path: root/src/wasm-validator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r--src/wasm-validator.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm-validator.h b/src/wasm-validator.h
index d78b54a47..35304d1c9 100644
--- a/src/wasm-validator.h
+++ b/src/wasm-validator.h
@@ -67,6 +67,8 @@ struct WasmValidator : public PostWalker<WasmValidator> {
bool validateWeb = false;
bool validateGlobally = true;
+ bool quiet = false; // whether to log errors verbosely
+
struct BreakInfo {
WasmType type;
Index arity;
@@ -98,7 +100,7 @@ public:
validateBinaryenIR(module);
}
// print if an error occurred
- if (!valid) {
+ if (!valid && !quiet) {
WasmPrinter::printModule(&module, std::cerr);
}
return valid;