summaryrefslogtreecommitdiff
path: root/src/pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pass.h')
-rw-r--r--src/pass.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/pass.h b/src/pass.h
index 4a5fe609d..0ad8d8c1d 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -32,6 +32,8 @@ class Pass;
// Global registry of all passes in /passes/
//
struct PassRegistry {
+ PassRegistry();
+
static PassRegistry* get();
typedef std::function<Pass* ()> Creator;
@@ -42,6 +44,8 @@ struct PassRegistry {
std::string getPassDescription(std::string name);
private:
+ void registerPasses();
+
struct PassInfo {
std::string description;
Creator create;
@@ -52,18 +56,6 @@ private:
};
//
-// Utility class to register a pass. See pass files for usage.
-//
-template<class P>
-struct RegisterPass {
- RegisterPass(const char* name, const char *description) {
- PassRegistry::get()->registerPass(name, description, []() {
- return new P();
- });
- }
-};
-
-//
// Runs a set of passes, in order
//
struct PassRunner {