]> granicus.if.org Git - llvm/commitdiff
Simplify llvm-cat help
authorSerge Guelton <sguelton@redhat.com>
Mon, 13 May 2019 11:29:25 +0000 (11:29 +0000)
committerSerge Guelton <sguelton@redhat.com>
Mon, 13 May 2019 11:29:25 +0000 (11:29 +0000)
Only output options that are directly relevant.

Differential Revision: https://reviews.llvm.org/D61740

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360575 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-cat/llvm-cat.cpp

index 5ae2799b60c87840cb4dec68978965a1fd4fb38c..6a0992806d6244245c76d5ea311ee20e4801de28 100644 (file)
 
 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: ");