diff options
Diffstat (limited to 'src/pass.h')
-rw-r--r-- | src/pass.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/pass.h b/src/pass.h index 02cea7879..60d6692a1 100644 --- a/src/pass.h +++ b/src/pass.h @@ -259,6 +259,8 @@ struct PassRunner { PassRunner(const PassRunner&) = delete; PassRunner& operator=(const PassRunner&) = delete; + virtual ~PassRunner() = default; + // But we can make it easy to create a nested runner // TODO: Go through and use this in more places explicit PassRunner(const PassRunner* runner) @@ -341,6 +343,9 @@ struct PassRunner { // Returns whether a pass by that name will remove debug info. static bool passRemovesDebugInfo(const std::string& name); +protected: + virtual void doAdd(std::unique_ptr<Pass> pass); + private: // Whether this is a nested pass runner. bool isNested = false; @@ -352,8 +357,6 @@ private: // Whether this pass runner has run. A pass runner should only be run once. bool ran = false; - void doAdd(std::unique_ptr<Pass> pass); - void runPass(Pass* pass); void runPassOnFunction(Pass* pass, Function* func); |