[PATCH] D104889: [llvm-strings] Switch command line parsing from llvm::cl to OptTable

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 2 11:27:33 PDT 2021


aganea added inline comments.


================
Comment at: llvm/tools/llvm-strings/llvm-strings.cpp:70
 
-static cl::opt<bool>
-    PrintFileName("print-file-name",
-                  cl::desc("Print the name of the file before each string"));
-static cl::alias PrintFileNameShort("f", cl::desc(""),
-                                    cl::aliasopt(PrintFileName));
-
-static cl::opt<int>
-    MinLength("bytes", cl::desc("Print sequences of the specified length"),
-              cl::init(4));
-static cl::alias MinLengthShort("n", cl::desc(""), cl::aliasopt(MinLength));
-
-static cl::opt<bool>
-    AllSections("all",
-                  cl::desc("Check all sections, not just the data section"));
-static cl::alias AllSectionsShort("a", cl::desc(""),
-                                    cl::aliasopt(AllSections));
+static bool AllSections;
+static int MinLength = 4;
----------------
Same comment as D105330, it would be nice if the globals were part a stack-based state instead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104889



More information about the llvm-commits mailing list