summaryrefslogtreecommitdiff
path: root/src/tools/optimization-options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/optimization-options.h')
-rw-r--r--src/tools/optimization-options.h45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/tools/optimization-options.h b/src/tools/optimization-options.h
index 8d526f92f..f1872bf3d 100644
--- a/src/tools/optimization-options.h
+++ b/src/tools/optimization-options.h
@@ -220,28 +220,29 @@ struct OptimizationOptions : public ToolOptions {
});
// add passes in registry
for (const auto& p : PassRegistry::get()->getRegisteredNames()) {
- (*this).add(std::string("--") + p,
- "",
- PassRegistry::get()->getPassDescription(p),
- // Allow an optional parameter to a pass. If provided, it is
- // the same as if using --pass-arg, that is,
- //
- // --foo=ARG
- //
- // is the same as
- //
- // --foo --pass-arg=foo@ARG
- Options::Arguments::Optional,
- [this, p](Options*, const std::string& arg) {
- if (!arg.empty()) {
- if (passOptions.arguments.count(p)) {
- Fatal()
- << "Cannot pass multiple pass arguments to " << p;
- }
- passOptions.arguments[p] = arg;
- }
- passes.push_back(p);
- });
+ (*this).add(
+ std::string("--") + p,
+ "",
+ PassRegistry::get()->getPassDescription(p),
+ // Allow an optional parameter to a pass. If provided, it is
+ // the same as if using --pass-arg, that is,
+ //
+ // --foo=ARG
+ //
+ // is the same as
+ //
+ // --foo --pass-arg=foo@ARG
+ Options::Arguments::Optional,
+ [this, p](Options*, const std::string& arg) {
+ if (!arg.empty()) {
+ if (passOptions.arguments.count(p)) {
+ Fatal() << "Cannot pass multiple pass arguments to " << p;
+ }
+ passOptions.arguments[p] = arg;
+ }
+ passes.push_back(p);
+ },
+ PassRegistry::get()->isPassHidden(p));
}
}