summaryrefslogtreecommitdiff
path: root/lib/IR
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
commit9a4e15cb762e14a1725847c26b5104845b0f22b2 (patch)
treeeaf71bd906ffe411496d3b0becd7344af2ffa33b /lib/IR
parent2a6c2bd504e7614d02e029b4e5c447a7638a5467 (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319505 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/DIBuilder.cpp4
-rw-r--r--lib/IR/Dominators.cpp6
-rw-r--r--lib/IR/LegacyPassManager.cpp22
3 files changed, 15 insertions, 17 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index 837b1ec5857..a00c595d01c 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -27,8 +27,8 @@ using namespace llvm::dwarf;
cl::opt<bool>
UseDbgAddr("use-dbg-addr",
- llvm::cl::desc("Use llvm.dbg.addr for all local variables"),
- cl::init(false));
+ llvm::cl::desc("Use llvm.dbg.addr for all local variables"),
+ cl::init(false), cl::Hidden);
DIBuilder::DIBuilder(Module &m, bool AllowUnresolvedNodes)
: M(m), VMContext(M.getContext()), CUNode(nullptr),
diff --git a/lib/IR/Dominators.cpp b/lib/IR/Dominators.cpp
index a5900e49ad0..a6127a5ef08 100644
--- a/lib/IR/Dominators.cpp
+++ b/lib/IR/Dominators.cpp
@@ -33,9 +33,9 @@ bool llvm::VerifyDomInfo = true;
#else
bool llvm::VerifyDomInfo = false;
#endif
-static cl::opt<bool,true>
-VerifyDomInfoX("verify-dom-info", cl::location(VerifyDomInfo),
- cl::desc("Verify dominator info (time consuming)"));
+static cl::opt<bool, true>
+ VerifyDomInfoX("verify-dom-info", cl::location(VerifyDomInfo), cl::Hidden,
+ cl::desc("Verify dominator info (time consuming)"));
bool BasicBlockEdge::isSingleEdge() const {
const TerminatorInst *TI = Start->getTerminator();
diff --git a/lib/IR/LegacyPassManager.cpp b/lib/IR/LegacyPassManager.cpp
index 995e1e57034..c13893d1a9e 100644
--- a/lib/IR/LegacyPassManager.cpp
+++ b/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