diff options
Diffstat (limited to 'src/pass.h')
-rw-r--r-- | src/pass.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pass.h b/src/pass.h index 503c164f9..2c3a09ae6 100644 --- a/src/pass.h +++ b/src/pass.h @@ -69,9 +69,12 @@ struct PassRunner { MixedArena* allocator; std::vector<Pass*> passes; Pass* currPass; + bool debug = false; PassRunner(MixedArena* allocator) : allocator(allocator) {} + void setDebug(bool debug_) { debug = debug_; } + void add(std::string passName) { auto pass = PassRegistry::get()->createPass(passName); assert(pass); @@ -112,6 +115,9 @@ public: virtual void run(PassRunner* runner, Module* module) = 0; // Override this to perform finalization work after the pass runs. virtual void finalize(PassRunner* runner, Module* module) {} + + std::string name; + protected: Pass() {} Pass(Pass &) {} |