[llvm] r360575 - Simplify llvm-cat help
Serge Guelton via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 04:29:25 PDT 2019
Author: serge_sans_paille
Date: Mon May 13 04:29:25 2019
New Revision: 360575
URL: http://llvm.org/viewvc/llvm-project?rev=360575&view=rev
Log:
Simplify llvm-cat help
Only output options that are directly relevant.
Differential Revision: https://reviews.llvm.org/D61740
Modified:
llvm/trunk/tools/llvm-cat/llvm-cat.cpp
Modified: llvm/trunk/tools/llvm-cat/llvm-cat.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cat/llvm-cat.cpp?rev=360575&r1=360574&r2=360575&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cat/llvm-cat.cpp (original)
+++ llvm/trunk/tools/llvm-cat/llvm-cat.cpp Mon May 13 04:29:25 2019
@@ -32,17 +32,23 @@
using namespace llvm;
+cl::OptionCategory CatCategory("llvm-cat Options");
+
static cl::opt<bool>
- BinaryCat("b", cl::desc("Whether to perform binary concatenation"));
+ BinaryCat("b", cl::desc("Whether to perform binary concatenation"),
+ cl::cat(CatCategory));
static cl::opt<std::string> OutputFilename("o", cl::Required,
cl::desc("Output filename"),
- cl::value_desc("filename"));
+ cl::value_desc("filename"),
+ cl::cat(CatCategory));
static cl::list<std::string> InputFilenames(cl::Positional, cl::ZeroOrMore,
- cl::desc("<input files>"));
+ cl::desc("<input files>"),
+ cl::cat(CatCategory));
int main(int argc, char **argv) {
+ cl::HideUnrelatedOptions(CatCategory);
cl::ParseCommandLineOptions(argc, argv, "Module concatenation");
ExitOnError ExitOnErr("llvm-cat: ");
More information about the llvm-commits
mailing list