summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LegacyPassManager.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-12-01 00:53:10 +0000
committerZachary Turner <zturner@google.com>2017-12-01 00:53:10 +0000
commit8065f0b975022c1419ab6c1ee6dca64b209311dc (patch)
tree014b235430c601a19300b725575ac65e37d44e3e /llvm/lib/IR/LegacyPassManager.cpp
parent888a42829238a00fd7e5d6daf07d48324699f5f2 (diff)
downloadbcm5719-llvm-8065f0b975022c1419ab6c1ee6dca64b209311dc.tar.gz
bcm5719-llvm-8065f0b975022c1419ab6c1ee6dca64b209311dc.zip
Mark all library options as hidden.
These command line options are not intended for public use, and often don't even make sense in the context of a particular tool anyway. About 90% of them are already hidden, but when people add new options they forget to hide them, so if you were to make a brand new tool today, link against one of LLVM's libraries, and run tool -help you would get a bunch of junk that doesn't make sense for the tool you're writing. This patch hides these options. The real solution is to not have libraries defining command line options, but that's a much larger effort and not something I'm prepared to take on. Differential Revision: https://reviews.llvm.org/D40674 llvm-svn: 319505
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r--llvm/lib/IR/LegacyPassManager.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index 995e1e57034..c13893d1a9e 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -75,21 +75,19 @@ PrintAfter("print-after",
llvm::cl::desc("Print IR after specified passes"),
cl::Hidden);
-static cl::opt<bool>
-PrintBeforeAll("print-before-all",
- llvm::cl::desc("Print IR before each pass"),
- cl::init(false));
-static cl::opt<bool>
-PrintAfterAll("print-after-all",
- llvm::cl::desc("Print IR after each pass"),
- cl::init(false));
+static cl::opt<bool> PrintBeforeAll("print-before-all",
+ llvm::cl::desc("Print IR before each pass"),
+ cl::init(false), cl::Hidden);
+static cl::opt<bool> PrintAfterAll("print-after-all",
+ llvm::cl::desc("Print IR after each pass"),
+ cl::init(false), cl::Hidden);
static cl::list<std::string>
PrintFuncsList("filter-print-funcs", cl::value_desc("function names"),
cl::desc("Only print IR for functions whose name "
"match this for all print-[before|after][-all] "
"options"),
- cl::CommaSeparated);
+ cl::CommaSeparated, cl::Hidden);
/// This is a helper to determine whether to print IR before or
/// after a pass.
@@ -1729,9 +1727,9 @@ bool PassManager::run(Module &M) {
// TimingInfo implementation
bool llvm::TimePassesIsEnabled = false;
-static cl::opt<bool,true>
-EnableTiming("time-passes", cl::location(TimePassesIsEnabled),
- cl::desc("Time each pass, printing elapsed time for each on exit"));
+static cl::opt<bool, true> EnableTiming(
+ "time-passes", cl::location(TimePassesIsEnabled), cl::Hidden,
+ cl::desc("Time each pass, printing elapsed time for each on exit"));
// createTheTimeInfo - This method either initializes the TheTimeInfo pointer to
// a non-null value (if the -time-passes option is enabled) or it leaves it
OpenPOWER on IntegriCloud