[PATCH] D61740: Simplify llvm-cat -help

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 03:17:59 PDT 2019


serge-sans-paille updated this revision to Diff 198996.
serge-sans-paille added a comment.

Include full context


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61740/new/

https://reviews.llvm.org/D61740

Files:
  llvm/tools/llvm-cat/llvm-cat.cpp


Index: llvm/tools/llvm-cat/llvm-cat.cpp
===================================================================
--- llvm/tools/llvm-cat/llvm-cat.cpp
+++ llvm/tools/llvm-cat/llvm-cat.cpp
@@ -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: ");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61740.198996.patch
Type: text/x-patch
Size: 1324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190510/9c1b20c2/attachment.bin>


More information about the llvm-commits mailing list