]> granicus.if.org Git - clang/commitdiff
Mark all library options as hidden.
authorZachary Turner <zturner@google.com>
Fri, 1 Dec 2017 00:53:10 +0000 (00:53 +0000)
committerZachary Turner <zturner@google.com>
Fri, 1 Dec 2017 00:53:10 +0000 (00:53 +0000)
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/cfe/trunk@319505 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenPGO.cpp

index 2215bad747d4908cc2c03352df40bb28ed4ad46a..52082edf64eb467a0a9abf511af7e77f7290c4fa 100644 (file)
@@ -61,7 +61,7 @@ using namespace clang;
 using namespace CodeGen;
 
 static llvm::cl::opt<bool> LimitedCoverage(
-    "limited-coverage-experimental", llvm::cl::ZeroOrMore,
+    "limited-coverage-experimental", llvm::cl::ZeroOrMore, llvm::cl::Hidden,
     llvm::cl::desc("Emit limited coverage mapping information (experimental)"),
     llvm::cl::init(false));
 
index 6a4b4df88ae509b8bdaee8a987b9c8a2e92bdaa7..295893c64fbc8a755649145f1555c4dc6c1ad528 100644 (file)
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MD5.h"
 
-static llvm::cl::opt<bool> EnableValueProfiling(
-  "enable-value-profiling", llvm::cl::ZeroOrMore,
-  llvm::cl::desc("Enable value profiling"), llvm::cl::init(false));
+static llvm::cl::opt<bool>
+    EnableValueProfiling("enable-value-profiling", llvm::cl::ZeroOrMore,
+                         llvm::cl::desc("Enable value profiling"),
+                         llvm::cl::Hidden, llvm::cl::init(false));
 
 using namespace clang;
 using namespace CodeGen;