diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-08 19:41:06 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-10-08 19:41:06 +0000 |
| commit | 732afdd09a7ff0e8ec60fc9503ed947a9b7b7eca (patch) | |
| tree | 17fc2ccb250922e11410849638641e52007b211d /llvm/tools/llvm-mc | |
| parent | 30cbd1ab84a26e688ee7910a32e13722feabfb57 (diff) | |
| download | bcm5719-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-mc')
| -rw-r--r-- | llvm/tools/llvm-mc/llvm-mc.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp index 78ad8765960..58eb33aa1f3 100644 --- a/llvm/tools/llvm-mc/llvm-mc.cpp +++ b/llvm/tools/llvm-mc/llvm-mc.cpp @@ -66,8 +66,7 @@ CompressDebugSections("compress-debug-sections", cl::ValueOptional, clEnumValN(DebugCompressionType::DCT_Zlib, "zlib", "Use zlib compression"), clEnumValN(DebugCompressionType::DCT_ZlibGnu, "zlib-gnu", - "Use zlib-gnu compression (deprecated)"), - clEnumValEnd)); + "Use zlib-gnu compression (deprecated)"))); static cl::opt<bool> ShowInst("show-inst", cl::desc("Show internal instruction representation")); @@ -105,8 +104,7 @@ FileType("filetype", cl::init(OFT_AssemblyFile), clEnumValN(OFT_Null, "null", "Don't emit anything (for timing purposes)"), clEnumValN(OFT_ObjectFile, "obj", - "Emit a native object ('.o') file"), - clEnumValEnd)); + "Emit a native object ('.o') file"))); static cl::list<std::string> IncludeDirs("I", cl::desc("Directory of include files"), @@ -148,8 +146,7 @@ CMModel("code-model", clEnumValN(CodeModel::Medium, "medium", "Medium code model"), clEnumValN(CodeModel::Large, "large", - "Large code model"), - clEnumValEnd)); + "Large code model"))); static cl::opt<bool> NoInitialTextSection("n", cl::desc("Don't assume assembly file starts " @@ -190,8 +187,7 @@ Action(cl::desc("Action to perform:"), clEnumValN(AC_Disassemble, "disassemble", "Disassemble strings of hex bytes"), clEnumValN(AC_MDisassemble, "mdis", - "Marked up disassembly of strings of hex bytes"), - clEnumValEnd)); + "Marked up disassembly of strings of hex bytes"))); static const Target *GetTarget(const char *ProgName) { // Figure out the target triple. |

