diff options
author | Zachary Turner <zturner@google.com> | 2017-12-01 00:53:10 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-12-01 00:53:10 +0000 |
commit | 8065f0b975022c1419ab6c1ee6dca64b209311dc (patch) | |
tree | 014b235430c601a19300b725575ac65e37d44e3e /llvm/lib/Support/Statistic.cpp | |
parent | 888a42829238a00fd7e5d6daf07d48324699f5f2 (diff) | |
download | bcm5719-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/Support/Statistic.cpp')
-rw-r--r-- | llvm/lib/Support/Statistic.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Support/Statistic.cpp b/llvm/lib/Support/Statistic.cpp index 72ca22806c4..23718bb0e9c 100644 --- a/llvm/lib/Support/Statistic.cpp +++ b/llvm/lib/Support/Statistic.cpp @@ -39,12 +39,14 @@ using namespace llvm; /// -stats - Command line option to cause transformations to emit stats about /// what they did. /// -static cl::opt<bool> Stats("stats", - cl::desc("Enable statistics output from program (available with Asserts)")); - +static cl::opt<bool> Stats( + "stats", + cl::desc("Enable statistics output from program (available with Asserts)"), + cl::Hidden); static cl::opt<bool> StatsAsJSON("stats-json", - cl::desc("Display statistics as json data")); + cl::desc("Display statistics as json data"), + cl::Hidden); static bool Enabled; static bool PrintOnExit; |