diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-04-12 18:27:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-12 18:27:13 -0700 |
commit | 9495b338121140d585648d64fb99e8ef7f92f867 (patch) | |
tree | 57418b1f685a4a5a43ee291759f64e9a763b1245 /src/tools/wasm-reduce.cpp | |
parent | 883d14de7157950063f74b81658d00df0d53be8d (diff) | |
download | binaryen-9495b338121140d585648d64fb99e8ef7f92f867.tar.gz binaryen-9495b338121140d585648d64fb99e8ef7f92f867.tar.bz2 binaryen-9495b338121140d585648d64fb99e8ef7f92f867.zip |
Move features from passOptions to Module (#2001)
This allows us to emit a (potentially modified) target features
section and conditionally emit other sections such as the DataCount
section based on the presence of features.
Diffstat (limited to 'src/tools/wasm-reduce.cpp')
-rw-r--r-- | src/tools/wasm-reduce.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 36a44b056..1f58da0d5 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -819,7 +819,7 @@ struct Reducer : public WalkerPass<PostWalker<Reducer, UnifiedExpressionVisitor< FunctionReferenceRemover referenceRemover(names); referenceRemover.walkModule(module.get()); - if (WasmValidator().validate(*module, FeatureSet::All, WasmValidator::Globally | WasmValidator::Quiet) && + if (WasmValidator().validate(*module, WasmValidator::Globally | WasmValidator::Quiet) && writeAndTestReduction()) { std::cerr << "| removed " << names.size() << " functions\n"; return true; |