summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli
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/lli
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/lli')
-rw-r--r--llvm/tools/lli/OrcLazyJIT.cpp3
-rw-r--r--llvm/tools/lli/lli.cpp12
2 files changed, 5 insertions, 10 deletions
diff --git a/llvm/tools/lli/OrcLazyJIT.cpp b/llvm/tools/lli/OrcLazyJIT.cpp
index de69a269887..40c9a5c4dc6 100644
--- a/llvm/tools/lli/OrcLazyJIT.cpp
+++ b/llvm/tools/lli/OrcLazyJIT.cpp
@@ -37,8 +37,7 @@ namespace {
"mods-to-disk",
"Dump modules to the current "
"working directory. (WARNING: "
- "will overwrite existing files)."),
- clEnumValEnd),
+ "will overwrite existing files).")),
cl::Hidden);
cl::opt<bool> OrcInlineStubs("orc-lazy-inline-stubs",
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index 00ae52d35e2..2bbd2287734 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -91,8 +91,7 @@ namespace {
"Orc-based MCJIT replacement"),
clEnumValN(JITKind::OrcLazy,
"orc-lazy",
- "Orc-based lazy JIT."),
- clEnumValEnd));
+ "Orc-based lazy JIT.")));
// The MCJIT supports building for a target address space separate from
// the JIT compilation process. Use a forked process and a copying
@@ -194,8 +193,7 @@ namespace {
clEnumValN(Reloc::PIC_, "pic",
"Fully relocatable, position independent code"),
clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic",
- "Relocatable external references, non-relocatable code"),
- clEnumValEnd));
+ "Relocatable external references, non-relocatable code")));
cl::opt<llvm::CodeModel::Model>
CMModel("code-model",
@@ -210,8 +208,7 @@ namespace {
clEnumValN(CodeModel::Medium, "medium",
"Medium code model"),
clEnumValN(CodeModel::Large, "large",
- "Large code model"),
- clEnumValEnd));
+ "Large code model")));
cl::opt<bool>
GenerateSoftFloatCalls("soft-float",
@@ -228,8 +225,7 @@ namespace {
clEnumValN(FloatABI::Soft, "soft",
"Soft float ABI (implied by -soft-float)"),
clEnumValN(FloatABI::Hard, "hard",
- "Hard float ABI (uses FP registers)"),
- clEnumValEnd));
+ "Hard float ABI (uses FP registers)")));
ExitOnError ExitOnErr;
}
OpenPOWER on IntegriCloud