summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-nm/llvm-nm.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-10-08 19:41:06 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-10-08 19:41:06 +0000
commit732afdd09a7ff0e8ec60fc9503ed947a9b7b7eca (patch)
tree17fc2ccb250922e11410849638641e52007b211d /llvm/tools/llvm-nm/llvm-nm.cpp
parent30cbd1ab84a26e688ee7910a32e13722feabfb57 (diff)
downloadbcm5719-llvm-732afdd09a7ff0e8ec60fc9503ed947a9b7b7eca.tar.gz
bcm5719-llvm-732afdd09a7ff0e8ec60fc9503ed947a9b7b7eca.zip
Turn cl::values() (for enum) from a vararg function to using C++ variadic template
The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 llvm-svn: 283671
Diffstat (limited to 'llvm/tools/llvm-nm/llvm-nm.cpp')
-rw-r--r--llvm/tools/llvm-nm/llvm-nm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-nm/llvm-nm.cpp b/llvm/tools/llvm-nm/llvm-nm.cpp
index 936a5c36d7a..0477dd13e02 100644
--- a/llvm/tools/llvm-nm/llvm-nm.cpp
+++ b/llvm/tools/llvm-nm/llvm-nm.cpp
@@ -56,7 +56,7 @@ cl::opt<OutputFormatTy> OutputFormat(
"format", cl::desc("Specify output format"),
cl::values(clEnumVal(bsd, "BSD format"), clEnumVal(sysv, "System V format"),
clEnumVal(posix, "POSIX.2 format"),
- clEnumVal(darwin, "Darwin -m format"), clEnumValEnd),
+ clEnumVal(darwin, "Darwin -m format")),
cl::init(bsd));
cl::alias OutputFormat2("f", cl::desc("Alias for --format"),
cl::aliasopt(OutputFormat));
@@ -143,7 +143,7 @@ enum Radix { d, o, x };
cl::opt<Radix>
AddressRadix("radix", cl::desc("Radix (o/d/x) for printing symbol Values"),
cl::values(clEnumVal(d, "decimal"), clEnumVal(o, "octal"),
- clEnumVal(x, "hexadecimal"), clEnumValEnd),
+ clEnumVal(x, "hexadecimal")),
cl::init(x));
cl::alias RadixAlias("t", cl::desc("Alias for --radix"),
cl::aliasopt(AddressRadix));
OpenPOWER on IntegriCloud