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
This commit is contained in:
Mehdi Amini
2016-10-08 19:41:06 +00:00
parent 30cbd1ab84
commit 732afdd09a
47 changed files with 106 additions and 181 deletions

View File

@@ -60,8 +60,7 @@ static cl::opt<UnsafeStackPtrStorageVal> USPStorage("safe-stack-usp-storage",
cl::values(clEnumValN(ThreadLocalUSP, "thread-local",
"Thread-local storage"),
clEnumValN(SingleThreadUSP, "single-thread",
"Non-thread-local storage"),
clEnumValEnd));
"Non-thread-local storage")));
namespace llvm {