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 cc63971fe..bc9b3edde 100644
--- a/src/pass.h
+++ b/src/pass.h
@@ -39,9 +39,14 @@ struct PassRegistry {
typedef std::function<Pass*()> Creator;
void registerPass(const char* name, const char* description, Creator create);
+ // Register a pass that's used for internal testing. These passes do not show
+ // up in --help.
+ void
+ registerTestPass(const char* name, const char* description, Creator create);
std::unique_ptr<Pass> createPass(std::string name);
std::vector<std::string> getRegisteredNames();
std::string getPassDescription(std::string name);
+ bool isPassHidden(std::string name);
private:
void registerPasses();
@@ -49,9 +54,10 @@ private:
struct PassInfo {
std::string description;
Creator create;
+ bool hidden;
PassInfo() = default;
- PassInfo(std::string description, Creator create)
- : description(description), create(create) {}
+ PassInfo(std::string description, Creator create, bool hidden = false)
+ : description(description), create(create), hidden(hidden) {}
};
std::map<std::string, PassInfo> passInfos;
};