summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-strings/llvm-strings.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-11-14 19:58:36 +0000
committerMartin Storsjo <martin@martin.st>2017-11-14 19:58:36 +0000
commit6835cac2f966193870686e081d8d4ac63ac4fe47 (patch)
tree9e24421ce54b8ecdbc3673c6a73099851092364a /llvm/tools/llvm-strings/llvm-strings.cpp
parent4629f523126477e338c09b0e4af80cfea3bc22d1 (diff)
downloadbcm5719-llvm-6835cac2f966193870686e081d8d4ac63ac4fe47.tar.gz
bcm5719-llvm-6835cac2f966193870686e081d8d4ac63ac4fe47.zip
[llvm-strings] Add support for the -a/--all options
They don't actually change nay behaviour, as llvm-strings currently checks the whole object without looking at individual sections anyway. This allows using llvm-strings in a context that explicitly passes the -a option. Differential Revision: https://reviews.llvm.org/D40020 llvm-svn: 318185
Diffstat (limited to 'llvm/tools/llvm-strings/llvm-strings.cpp')
-rw-r--r--llvm/tools/llvm-strings/llvm-strings.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/llvm-strings/llvm-strings.cpp b/llvm/tools/llvm-strings/llvm-strings.cpp
index 5053e9b97b7..638d58fce2b 100644
--- a/llvm/tools/llvm-strings/llvm-strings.cpp
+++ b/llvm/tools/llvm-strings/llvm-strings.cpp
@@ -41,6 +41,12 @@ static cl::opt<int>
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"),
OpenPOWER on IntegriCloud