[PATCH] D40020: [llvm-strings] Add support for the -a/--all options

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 11:59:09 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL318185: [llvm-strings] Add support for the -a/--all options (authored by mstorsjo).

Changed prior to commit:
  https://reviews.llvm.org/D40020?vs=122819&id=122892#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D40020

Files:
  llvm/trunk/test/tools/llvm-strings/all-sections.test
  llvm/trunk/tools/llvm-strings/llvm-strings.cpp


Index: llvm/trunk/test/tools/llvm-strings/all-sections.test
===================================================================
--- llvm/trunk/test/tools/llvm-strings/all-sections.test
+++ llvm/trunk/test/tools/llvm-strings/all-sections.test
@@ -0,0 +1,3 @@
+RUN: llvm-strings -a %S/Inputs/abcd | FileCheck %s
+RUN: llvm-strings --all %S/Inputs/abcd | FileCheck %s
+CHECK: abcd
Index: llvm/trunk/tools/llvm-strings/llvm-strings.cpp
===================================================================
--- llvm/trunk/tools/llvm-strings/llvm-strings.cpp
+++ llvm/trunk/tools/llvm-strings/llvm-strings.cpp
@@ -41,6 +41,12 @@
               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));
+
 enum radix { none, octal, hexadecimal, decimal };
 static cl::opt<radix>
     Radix("radix", cl::desc("print the offset within the file"),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40020.122892.patch
Type: text/x-patch
Size: 1116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171114/41d37995/attachment-0001.bin>


More information about the llvm-commits mailing list