diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-09-01 12:34:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 12:34:03 -0700 |
commit | 6de14693110b4f898344ff1cb383caf0d74eb42e (patch) | |
tree | 6fbcb75fd3c2285191939a086989e14656908282 /src/wasm-validator.h | |
parent | b013f744e3d70effd9be348cbde7fb93f0a16c6a (diff) | |
download | binaryen-6de14693110b4f898344ff1cb383caf0d74eb42e.tar.gz binaryen-6de14693110b4f898344ff1cb383caf0d74eb42e.tar.bz2 binaryen-6de14693110b4f898344ff1cb383caf0d74eb42e.zip |
wasm-reduce tool (#1139)
Reduce an interesting wasm to a smaller still interesting wasm. This takes an arbitrary command to run, and reduces the wasm as much as it can while keeping the behavior of that command fixed. This can be used to reduce compiler bugs in an arbitrary VM, etc.
Diffstat (limited to 'src/wasm-validator.h')
-rw-r--r-- | src/wasm-validator.h | 4 |
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; |