From: Zachary Turner Date: Fri, 1 Dec 2017 00:53:10 +0000 (+0000) Subject: Mark all library options as hidden. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c66d3ae38bed8be86af6c7190ad706571fcc49c5;p=clang 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/cfe/trunk@319505 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 2215bad747..52082edf64 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -61,7 +61,7 @@ using namespace clang; using namespace CodeGen; static llvm::cl::opt 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)); diff --git a/lib/CodeGen/CodeGenPGO.cpp b/lib/CodeGen/CodeGenPGO.cpp index 6a4b4df88a..295893c64f 100644 --- a/lib/CodeGen/CodeGenPGO.cpp +++ b/lib/CodeGen/CodeGenPGO.cpp @@ -22,9 +22,10 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/MD5.h" -static llvm::cl::opt EnableValueProfiling( - "enable-value-profiling", llvm::cl::ZeroOrMore, - llvm::cl::desc("Enable value profiling"), llvm::cl::init(false)); +static llvm::cl::opt + 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;