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/lib/Target | |
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/lib/Target')
-rw-r--r-- | llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMSubtarget.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/MSP430/MSP430ISelLowering.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp | 3 |
6 files changed, 6 insertions, 12 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp index fbce26e1d9a..8fc82232959 100644 --- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp +++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp @@ -29,8 +29,7 @@ static cl::opt<AsmWriterVariantTy> AsmWriterVariant( "aarch64-neon-syntax", cl::init(Default), cl::desc("Choose style of NEON code to emit from AArch64 backend:"), cl::values(clEnumValN(Generic, "generic", "Emit generic NEON assembly"), - clEnumValN(Apple, "apple", "Emit Apple-style NEON assembly"), - clEnumValEnd)); + clEnumValN(Apple, "apple", "Emit Apple-style NEON assembly"))); AArch64MCAsmInfoDarwin::AArch64MCAsmInfoDarwin() { // We prefer NEON instructions to be printed in the short form. diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp index f39e792025e..a27c190d2a4 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.cpp +++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp @@ -59,8 +59,7 @@ IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow deprecated IT based on ARMv8"), clEnumValN(NoRestrictedIT, "arm-no-restrict-it", - "Allow IT blocks based on ARMv7"), - clEnumValEnd)); + "Allow IT blocks based on ARMv7"))); /// ForceFastISel - Use the fast-isel, even for subtargets where it is not /// currently supported (for testing only). diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 8c63bea3539..2b210ddb07d 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -65,8 +65,7 @@ static cl::opt<ImplicitItModeTy> ImplicitItMode( clEnumValN(ImplicitItModeTy::ARMOnly, "arm", "Accept in ARM, reject in Thumb"), clEnumValN(ImplicitItModeTy::ThumbOnly, "thumb", - "Warn in ARM, emit implicit ITs in Thumb"), - clEnumValEnd)); + "Warn in ARM, emit implicit ITs in Thumb"))); class ARMOperand; diff --git a/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp b/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp index c281f9718d7..73346b9ce41 100644 --- a/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp +++ b/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp @@ -54,8 +54,7 @@ HWMultMode("msp430-hwmult-mode", cl::Hidden, clEnumValN(HWMultIntr, "interrupts", "Assume hardware multiplier can be used inside interrupts"), clEnumValN(HWMultNoIntr, "use", - "Assume hardware multiplier cannot be used inside interrupts"), - clEnumValEnd)); + "Assume hardware multiplier cannot be used inside interrupts"))); MSP430TargetLowering::MSP430TargetLowering(const TargetMachine &TM, const MSP430Subtarget &STI) diff --git a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp index cd206abda36..c821084f68c 100644 --- a/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp +++ b/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp @@ -79,8 +79,7 @@ static cl::opt<CompactBranchPolicy> MipsCompactBranchPolicy( cl::values( clEnumValN(CB_Never, "never", "Do not use compact branches if possible."), clEnumValN(CB_Optimal, "optimal", "Use compact branches where appropiate (default)."), - clEnumValN(CB_Always, "always", "Always use compact branches if possible."), - clEnumValEnd + clEnumValN(CB_Always, "always", "Always use compact branches if possible.") ) ); diff --git a/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp b/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp index b7c56cec2db..48a1d8f1330 100644 --- a/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp +++ b/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp @@ -31,8 +31,7 @@ static cl::opt<AsmWriterFlavorTy> AsmWriterFlavor("x86-asm-syntax", cl::init(ATT), cl::desc("Choose style of code to emit from X86 backend:"), cl::values(clEnumValN(ATT, "att", "Emit AT&T-style assembly"), - clEnumValN(Intel, "intel", "Emit Intel-style assembly"), - clEnumValEnd)); + clEnumValN(Intel, "intel", "Emit Intel-style assembly"))); static cl::opt<bool> MarkedJTDataRegions("mark-data-regions", cl::init(true), |