[PATCH] D39539: [llvm-nm] Don't error out on multiple occurrances of the -g/--external-only flag
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 13:31:15 PDT 2017
mstorsjo updated this revision to Diff 121358.
mstorsjo retitled this revision from "[Support] Don't error out on multiple occurrances of an Optional flag" to "[llvm-nm] Don't error out on multiple occurrances of the -g/--external-only flag".
mstorsjo edited the summary of this revision.
mstorsjo added a comment.
Changed the type of this option instead.
https://reviews.llvm.org/D39539
Files:
test/tools/llvm-nm/X86/externalonly.test
tools/llvm-nm/llvm-nm.cpp
Index: tools/llvm-nm/llvm-nm.cpp
===================================================================
--- tools/llvm-nm/llvm-nm.cpp
+++ tools/llvm-nm/llvm-nm.cpp
@@ -85,9 +85,11 @@
cl::aliasopt(DefinedOnly), cl::Grouping);
cl::opt<bool> ExternalOnly("extern-only",
- cl::desc("Show only external symbols"));
+ cl::desc("Show only external symbols"),
+ cl::ZeroOrMore);
cl::alias ExternalOnly2("g", cl::desc("Alias for --extern-only"),
- cl::aliasopt(ExternalOnly), cl::Grouping);
+ cl::aliasopt(ExternalOnly), cl::Grouping,
+ cl::ZeroOrMore);
cl::opt<bool> BSDFormat("B", cl::desc("Alias for --format=bsd"),
cl::Grouping);
Index: test/tools/llvm-nm/X86/externalonly.test
===================================================================
--- test/tools/llvm-nm/X86/externalonly.test
+++ test/tools/llvm-nm/X86/externalonly.test
@@ -1,4 +1,5 @@
# RUN: llvm-nm -g %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s
+# RUN: llvm-nm -g -g %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s
# CHECK-NOT: EH_frame0
# CHECK: _main
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39539.121358.patch
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171102/447981bc/attachment.bin>
More information about the llvm-commits
mailing list