summaryrefslogtreecommitdiff
path: root/src/pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pass.h')
-rw-r--r--src/pass.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pass.h b/src/pass.h
index e237b8a98..35065b0a3 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -62,12 +62,18 @@ struct PassRunner {
Module* wasm;
MixedArena* allocator;
std::vector<Pass*> passes;
- Pass* currPass;
bool debug = false;
+ bool validateGlobally = false;
PassRunner(Module* wasm) : wasm(wasm), allocator(&wasm->allocator) {}
- void setDebug(bool debug_) { debug = debug_; }
+ void setDebug(bool debug_) {
+ debug = debug_;
+ validateGlobally = debug; // validate everything by default if debugging
+ }
+ void setValidateGlobally(bool validate) {
+ validateGlobally = validate;
+ }
void add(std::string passName) {
auto pass = PassRegistry::get()->createPass(passName);