cl::opt<DatabaseFormatTy> DatabaseFormat(
"db", cl::desc("Specify input format"),
cl::values(clEnumVal(fixed, "Hard-coded mapping"),
- clEnumVal(yaml, "Yaml database created by find-all-symbols"),
- clEnumValEnd),
+ clEnumVal(yaml, "Yaml database created by find-all-symbols")),
cl::init(yaml), cl::cat(IncludeFixerCategory));
cl::opt<std::string> Input("input",
Action(cl::desc("Action:"), cl::init(ActionType::None),
cl::values(
clEnumValN(ActionType::PrintSourceSymbols,
- "print-source-symbols", "Print symbols from source"),
- clEnumValEnd),
+ "print-source-symbols", "Print symbols from source")),
cl::cat(IndexTestCoreCategory));
static cl::extrahelp MoreHelp(
clEnumValN(GenAttrDocs, "gen-attr-docs",
"Generate attribute documentation"),
clEnumValN(GenDiagDocs, "gen-diag-docs",
- "Generate attribute documentation"),
- clEnumValEnd));
+ "Generate attribute documentation")));
cl::opt<std::string>
ClangComponent("clang-component",
clEnumVal(g , "No optimizations, enable debugging"),
clEnumVal(O1, "Enable trivial optimizations"),
clEnumVal(O2, "Enable default optimizations"),
- clEnumVal(O3, "Enable expensive optimizations"),
- clEnumValEnd));
+ clEnumVal(O3, "Enable expensive optimizations")));
...
if (OptimizationLevel >= O2) doPartialRedundancyElimination(...);
clEnumValN(Debug, "g", "No optimizations, enable debugging"),
clEnumVal(O1 , "Enable trivial optimizations"),
clEnumVal(O2 , "Enable default optimizations"),
- clEnumVal(O3 , "Enable expensive optimizations"),
- clEnumValEnd));
+ clEnumVal(O3 , "Enable expensive optimizations")));
...
if (OptimizationLevel == Debug) outputDebugInfo(...);
cl::values(
clEnumValN(nodebuginfo, "none", "disable debug information"),
clEnumVal(quick, "enable quick debug information"),
- clEnumVal(detailed, "enable detailed debug information"),
- clEnumValEnd));
+ clEnumVal(detailed, "enable detailed debug information")));
This definition defines an enumerated command line variable of type "``enum
DebugLev``", which works exactly the same way as before. The difference here is
clEnumVal(dce , "Dead Code Elimination"),
clEnumVal(constprop , "Constant Propagation"),
clEnumValN(inlining, "inline", "Procedure Integration"),
- clEnumVal(strip , "Strip Symbols"),
- clEnumValEnd));
+ clEnumVal(strip , "Strip Symbols")));
This defines a variable that is conceptually of the type
"``std::vector<enum Opts>``". Thus, you can access it with standard vector
clEnumVal(dce , "Dead Code Elimination"),
clEnumVal(constprop , "Constant Propagation"),
clEnumValN(inlining, "inline", "Procedure Integration"),
- clEnumVal(strip , "Strip Symbols"),
- clEnumValEnd));
+ clEnumVal(strip , "Strip Symbols")));
To test to see if ``constprop`` was specified, we can use the ``cl:bits::isSet``
function:
clEnumValN(Reloc::RWPI, "rwpi",
"Read-write data relocatable, accessed relative to static base"),
clEnumValN(Reloc::ROPI_RWPI, "ropi-rwpi",
- "Combination of ropi and rwpi"),
- clEnumValEnd));
+ "Combination of ropi and rwpi")));
static inline Optional<Reloc::Model> getRelocModel() {
if (RelocModel.getNumOccurrences()) {
cl::values(clEnumValN(ThreadModel::POSIX, "posix",
"POSIX thread model"),
clEnumValN(ThreadModel::Single, "single",
- "Single thread model"),
- clEnumValEnd));
+ "Single thread model")));
cl::opt<llvm::CodeModel::Model>
CMModel("code-model",
clEnumValN(CodeModel::Medium, "medium",
"Medium code model"),
clEnumValN(CodeModel::Large, "large",
- "Large code model"),
- clEnumValEnd));
+ "Large code model")));
cl::opt<llvm::ExceptionHandling>
ExceptionModel("exception-model",
clEnumValN(ExceptionHandling::ARM, "arm",
"ARM EHABI exceptions"),
clEnumValN(ExceptionHandling::WinEH, "wineh",
- "Windows exception model"),
- clEnumValEnd));
+ "Windows exception model")));
cl::opt<TargetMachine::CodeGenFileType>
FileType("filetype", cl::init(TargetMachine::CGFT_AssemblyFile),
clEnumValN(TargetMachine::CGFT_ObjectFile, "obj",
"Emit a native object ('.o') file"),
clEnumValN(TargetMachine::CGFT_Null, "null",
- "Emit nothing, for performance testing"),
- clEnumValEnd));
+ "Emit nothing, for performance testing")));
cl::opt<bool>
EnableFPMAD("enable-fp-mad",
"the sign of a flushed-to-zero number is preserved "
"in the sign of 0"),
clEnumValN(FPDenormal::PositiveZero, "positive-zero",
- "denormals are flushed to positive zero"),
- clEnumValEnd));
+ "denormals are flushed to positive zero")));
cl::opt<bool>
EnableHonorSignDependentRoundingFPMath("enable-sign-dependent-rounding-fp-math",
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)")));
cl::opt<llvm::FPOpFusion::FPOpFusionMode>
FuseFPOps("fp-contract",
clEnumValN(FPOpFusion::Standard, "on",
"Only fuse 'blessed' FP ops."),
clEnumValN(FPOpFusion::Strict, "off",
- "Only fuse FP ops when the result won't be affected."),
- clEnumValEnd));
+ "Only fuse FP ops when the result won't be affected.")));
cl::opt<bool>
DontPlaceZerosInBSS("nozero-initialized-in-bss",
clEnumValN(JumpTable::Simplified, "simplified",
"Create one table per simplified function type."),
clEnumValN(JumpTable::Full, "full",
- "Create one table per unique function type."),
- clEnumValEnd));
+ "Create one table per unique function type.")));
cl::opt<llvm::EABI> EABIVersion(
"meabi", cl::desc("Set EABI type (default depends on triple):"),
"Triple default EABI version"),
clEnumValN(EABI::EABI4, "4", "EABI version 4"),
clEnumValN(EABI::EABI5, "5", "EABI version 5"),
- clEnumValN(EABI::GNU, "gnu", "EABI GNU"), clEnumValEnd));
+ clEnumValN(EABI::GNU, "gnu", "EABI GNU")));
cl::opt<DebuggerKind>
DebuggerTuningOpt("debugger-tune",
clEnumValN(DebuggerKind::GDB, "gdb", "gdb"),
clEnumValN(DebuggerKind::LLDB, "lldb", "lldb"),
clEnumValN(DebuggerKind::SCE, "sce",
- "SCE targets (e.g. PS4)"),
- clEnumValEnd));
+ "SCE targets (e.g. PS4)")));
// Common utility function tightly tied to the options listed here. Initializes
// a TargetOptions object with CodeGen flags and returns it.
cl::values(clEnumValN(MCTargetOptions::AsmInstrumentationNone, "none",
"no instrumentation at all"),
clEnumValN(MCTargetOptions::AsmInstrumentationAddress, "address",
- "instrument instructions with memory arguments"),
- clEnumValEnd));
+ "instrument instructions with memory arguments")));
cl::opt<bool> RelaxAll("mc-relax-all",
cl::desc("When used with filetype=obj, "
//===----------------------------------------------------------------------===//
// Enum valued command line option
//
-#define clEnumVal(ENUMVAL, DESC) #ENUMVAL, int(ENUMVAL), DESC
-#define clEnumValN(ENUMVAL, FLAGNAME, DESC) FLAGNAME, int(ENUMVAL), DESC
-#define clEnumValEnd (reinterpret_cast<void *>(0))
+
+// This represents a single enum value, using "int" as the underlying type.
+struct OptionEnumValue {
+ StringRef Name;
+ int Value;
+ StringRef Description;
+};
+
+#define clEnumVal(ENUMVAL, DESC) \
+ cl::OptionEnumValue { #ENUMVAL, int(ENUMVAL), DESC }
+#define clEnumValN(ENUMVAL, FLAGNAME, DESC) \
+ cl::OptionEnumValue { FLAGNAME, int(ENUMVAL), DESC }
// values - For custom data types, allow specifying a group of values together
-// as the values that go into the mapping that the option handler uses. Note
-// that the values list must always have a 0 at the end of the list to indicate
-// that the list has ended.
+// as the values that go into the mapping that the option handler uses.
//
-template <class DataType> class ValuesClass {
+class ValuesClass {
// Use a vector instead of a map, because the lists should be short,
// the overhead is less, and most importantly, it keeps them in the order
// inserted so we can print our option out nicely.
- SmallVector<std::pair<StringRef , std::pair<int, StringRef >>, 4> Values;
- void processValues(va_list Vals);
+ SmallVector<OptionEnumValue, 4> Values;
public:
- ValuesClass(StringRef EnumName, DataType Val, StringRef Desc,
- va_list ValueArgs) {
- // Insert the first value, which is required.
- Values.push_back(std::make_pair(EnumName, std::make_pair(Val, Desc)));
-
- // Process the varargs portion of the values...
- while (const char *enumName = va_arg(ValueArgs, const char * )) {
- DataType EnumVal = static_cast<DataType>(va_arg(ValueArgs, int));
- auto EnumDesc = StringRef(va_arg(ValueArgs, const char * ));
- Values.push_back(std::make_pair(StringRef(enumName), // Add value to value map
- std::make_pair(EnumVal, EnumDesc)));
- }
- }
+ ValuesClass(std::initializer_list<OptionEnumValue> Options)
+ : Values(Options) {}
template <class Opt> void apply(Opt &O) const {
- for (size_t i = 0, e = Values.size(); i != e; ++i)
- O.getParser().addLiteralOption(Values[i].first, Values[i].second.first,
- Values[i].second.second);
+ for (auto Value : Values)
+ O.getParser().addLiteralOption(Value.Name, Value.Value,
+ Value.Description);
}
};
-template <class DataType>
-ValuesClass<DataType> LLVM_END_WITH_NULL
-values(StringRef Arg, DataType Val, StringRef Desc, ...) {
- va_list ValueArgs;
- va_start(ValueArgs, Desc);
- ValuesClass<DataType> Vals(Arg, Val, Desc, ValueArgs);
- va_end(ValueArgs);
- return Vals;
+/// Helper to build a ValuesClass by forwarding a variable number of arguments
+/// as an initializer list to the ValuesClass constructor.
+template <typename... OptsTy> ValuesClass values(OptsTy... Options) {
+ return ValuesClass({Options...});
}
//===----------------------------------------------------------------------===//
"display a graph using the raw "
"integer fractional block frequency representation."),
clEnumValN(GVDT_Count, "count", "display a graph using the real "
- "profile count if available."),
- clEnumValEnd));
+ "profile count if available.")));
cl::opt<std::string>
ViewBlockFreqFuncName("view-bfi-func-name", cl::Hidden,
clEnumValN(Region::PrintBB, "bb",
"print regions in detail with block_iterator"),
clEnumValN(Region::PrintRN, "rn",
- "print regions in detail with element_iterator"),
- clEnumValEnd));
+ "print regions in detail with element_iterator")));
//===----------------------------------------------------------------------===//
clEnumValN(TargetLibraryInfoImpl::Accelerate, "Accelerate",
"Accelerate framework"),
clEnumValN(TargetLibraryInfoImpl::SVML, "SVML",
- "Intel SVML library"),
- clEnumValEnd));
+ "Intel SVML library")));
StringRef const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = {
#define TLI_DEFINE_STRING
cl::desc("Output prototype dwarf accelerator tables."),
cl::values(clEnumVal(Default, "Default for platform"),
clEnumVal(Enable, "Enabled"),
- clEnumVal(Disable, "Disabled"), clEnumValEnd),
+ clEnumVal(Disable, "Disabled")),
cl::init(Default));
static cl::opt<DefaultOnOff>
cl::desc("Output DWARF5 split debug info."),
cl::values(clEnumVal(Default, "Default for platform"),
clEnumVal(Enable, "Enabled"),
- clEnumVal(Disable, "Disabled"), clEnumValEnd),
+ clEnumVal(Disable, "Disabled")),
cl::init(Default));
static cl::opt<DefaultOnOff>
cl::desc("Generate DWARF pubnames and pubtypes sections"),
cl::values(clEnumVal(Default, "Default for platform"),
clEnumVal(Enable, "Enabled"),
- clEnumVal(Disable, "Disabled"), clEnumValEnd),
+ clEnumVal(Disable, "Disabled")),
cl::init(Default));
enum LinkageNameOption {
"Default for platform"),
clEnumValN(AllLinkageNames, "All", "All"),
clEnumValN(AbstractLinkageNames, "Abstract",
- "Abstract subprograms"),
- clEnumValEnd),
+ "Abstract subprograms")),
cl::init(DefaultLinkageNames));
static const char *const DWARFGroupName = "DWARF Emission";
cl::values(clEnumValN(RegBankSelect::Mode::Fast, "regbankselect-fast",
"Run the Fast mode (default mapping)"),
clEnumValN(RegBankSelect::Mode::Greedy, "regbankselect-greedy",
- "Use the Greedy mode (best local mapping)"),
- clEnumValEnd));
+ "Use the Greedy mode (best local mapping)")));
char RegBankSelect::ID = 0;
INITIALIZE_PASS_BEGIN(RegBankSelect, DEBUG_TYPE,
"display a graph using the raw "
"integer fractional block frequency representation."),
clEnumValN(GVDT_Count, "count", "display a graph using the real "
- "profile count if available."),
-
- clEnumValEnd));
+ "profile count if available.")));
extern cl::opt<std::string> ViewBlockFreqFuncName;
extern cl::opt<unsigned> ViewHotFreqPercent;
cl::desc("Spill mode for splitting live ranges"),
cl::values(clEnumValN(SplitEditor::SM_Partition, "default", "Default"),
clEnumValN(SplitEditor::SM_Size, "size", "Optimize for size"),
- clEnumValN(SplitEditor::SM_Speed, "speed", "Optimize for speed"),
- clEnumValEnd),
+ clEnumValN(SplitEditor::SM_Speed, "speed", "Optimize for speed")),
cl::init(SplitEditor::SM_Speed));
static cl::opt<unsigned>
cl::values(clEnumValN(ThreadLocalUSP, "thread-local",
"Thread-local storage"),
clEnumValN(SingleThreadUSP, "single-thread",
- "Non-thread-local storage"),
- clEnumValEnd));
+ "Non-thread-local storage")));
namespace llvm {
clEnumValN(CFLAAType::Andersen, "anders",
"Enable inclusion-based CFL-AA"),
clEnumValN(CFLAAType::Both, "both",
- "Enable both variants of CFL-AA"),
- clEnumValEnd));
+ "Enable both variants of CFL-AA")));
/// Allow standard passes to be disabled by command line options. This supports
/// simple binary flags that either suppress the pass or do nothing.
clEnumVal(Arguments , "print pass arguments to pass to 'opt'"),
clEnumVal(Structure , "print pass structure before run()"),
clEnumVal(Executions, "print pass name before it is executed"),
- clEnumVal(Details , "print pass details when it is executed"),
- clEnumValEnd));
+ clEnumVal(Details , "print pass details when it is executed")));
namespace {
typedef llvm::cl::list<const llvm::PassInfo *, bool, PassNameParser>
"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.
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).
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;
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)
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.")
)
);
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),
cl::values(clEnumValN(InlinerFunctionImportStatsOpts::Basic, "basic",
"basic statistics"),
clEnumValN(InlinerFunctionImportStatsOpts::Verbose, "verbose",
- "printing of statistics for each inlined function"),
- clEnumValEnd),
+ "printing of statistics for each inlined function")),
cl::Hidden, cl::desc("Enable inliner stats for imported functions"));
} // namespace
clEnumValN(CFLAAType::Andersen, "anders",
"Enable inclusion-based CFL-AA"),
clEnumValN(CFLAAType::Both, "both",
- "Enable both variants of CFL-AA"),
- clEnumValEnd));
+ "Enable both variants of CFL-AA")));
static cl::opt<bool>
EnableMLSM("mlsm", cl::init(true), cl::Hidden,
clEnumValN(OnlyCheapRepl, "cheap",
"only replace exit value when the cost is cheap"),
clEnumValN(AlwaysRepl, "always",
- "always replace exit value whenever possible"),
- clEnumValEnd));
+ "always replace exit value whenever possible")));
namespace {
struct RewritePhi;
"compile the bitcode. Useful to avoid linking."),
clEnumValN(Custom, "run-custom",
"Use -exec-command to define a command to execute "
- "the bitcode. Useful for cross-compilation."),
- clEnumValEnd),
+ "the bitcode. Useful for cross-compilation.")),
cl::init(AutoPick));
cl::opt<OutputType> SafeInterpreterSel(
clEnumValN(RunLLC, "safe-run-llc", "Compile with LLC"),
clEnumValN(Custom, "safe-run-custom",
"Use -exec-command to define a command to execute "
- "the bitcode. Useful for cross-compilation."),
- clEnumValEnd),
+ "the bitcode. Useful for cross-compilation.")),
cl::init(AutoPick));
cl::opt<std::string> SafeInterpreterPath(
"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",
"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
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",
clEnumValN(CodeModel::Medium, "medium",
"Medium code model"),
clEnumValN(CodeModel::Large, "large",
- "Large code model"),
- clEnumValEnd));
+ "Large code model")));
cl::opt<bool>
GenerateSoftFloatCalls("soft-float",
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;
}
FormatOpt("format", cl::desc("Archive format to create"),
cl::values(clEnumValN(Default, "default", "default"),
clEnumValN(GNU, "gnu", "gnu"),
- clEnumValN(BSD, "bsd", "bsd"), clEnumValEnd));
+ clEnumValN(BSD, "bsd", "bsd")));
static std::string Options;
cl::values(clEnumValN(CoverageViewOptions::OutputFormat::Text, "text",
"Text output"),
clEnumValN(CoverageViewOptions::OutputFormat::HTML, "html",
- "HTML output"),
- clEnumValEnd),
+ "HTML output")),
cl::init(CoverageViewOptions::OutputFormat::Text));
cl::opt<bool> FilenameEquivalence(
".debug_str_offsets.dwo"),
clEnumValN(DIDT_CUIndex, "cu_index", ".debug_cu_index"),
clEnumValN(DIDT_GdbIndex, "gdb_index", ".gdb_index"),
- clEnumValN(DIDT_TUIndex, "tu_index", ".debug_tu_index"), clEnumValEnd));
+ clEnumValN(DIDT_TUIndex, "tu_index", ".debug_tu_index")));
static void error(StringRef Filename, std::error_code EC) {
if (!EC)
"(requires -thinlto-index)."),
clEnumValN(THINOPT, "optimize", "Perform ThinLTO optimizations."),
clEnumValN(THINCODEGEN, "codegen", "CodeGen (expected to match llc)"),
- clEnumValN(THINALL, "run", "Perform ThinLTO end-to-end"),
- clEnumValEnd));
+ clEnumValN(THINALL, "run", "Perform ThinLTO end-to-end")));
static cl::opt<std::string>
ThinLTOIndex("thinlto-index",
cl::values(clEnumValN(AC_Assemble, "assemble",
"Assemble a .s file (default)"),
clEnumValN(AC_Disassemble, "disassemble",
- "Disassemble strings of hex bytes"),
- clEnumValEnd));
+ "Disassemble strings of hex bytes")));
static cl::opt<std::string>
TripleName("triple", cl::desc("Target triple to assemble for, "
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"));
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"),
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 "
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.
"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));
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));
cl::opt<DIDumpType> llvm::DwarfDumpType(
"dwarf", cl::init(DIDT_Null), cl::desc("Dump of dwarf debug sections:"),
- cl::values(clEnumValN(DIDT_Frames, "frames", ".debug_frame"),
- clEnumValEnd));
+ cl::values(clEnumValN(DIDT_Frames, "frames", ".debug_frame")));
cl::opt<bool> PrintSource(
"source",
cl::opt<ProfileKinds> ProfileKind(
cl::desc("Profile kind:"), cl::init(instr),
cl::values(clEnumVal(instr, "Instrumentation profile (default)"),
- clEnumVal(sample, "Sample profile"), clEnumValEnd));
+ clEnumVal(sample, "Sample profile")));
cl::opt<ProfileFormat> OutputFormat(
cl::desc("Format of output profile"), cl::init(PF_Binary),
cl::values(clEnumValN(PF_Binary, "binary", "Binary encoding (default)"),
clEnumValN(PF_Text, "text", "Text encoding"),
clEnumValN(PF_GCC, "gcc",
- "GCC encoding (only meaningful for -sample)"),
- clEnumValEnd));
+ "GCC encoding (only meaningful for -sample)")));
cl::opt<bool> OutputSparse("sparse", cl::init(false),
cl::desc("Generate a sparse profile (only meaningful for -instr)"));
cl::opt<unsigned> NumThreads(
cl::opt<ProfileKinds> ProfileKind(
cl::desc("Profile kind:"), cl::init(instr),
cl::values(clEnumVal(instr, "Instrumentation profile (default)"),
- clEnumVal(sample, "Sample profile"), clEnumValEnd));
+ clEnumVal(sample, "Sample profile")));
cl::ParseCommandLineOptions(argc, argv, "LLVM profile data summary\n");
cl::opt<OutputStyleTy>
Output("elf-output-style", cl::desc("Specify ELF dump style"),
cl::values(clEnumVal(LLVM, "LLVM default style"),
- clEnumVal(GNU, "GNU readelf style"), clEnumValEnd),
+ clEnumVal(GNU, "GNU readelf style")),
cl::init(LLVM));
} // namespace opts
clEnumValN(AC_PrintObjectLineInfo, "printobjline",
"Like -printlineinfo but does not load the object first"),
clEnumValN(AC_Verify, "verify",
- "Load, link and verify the resulting memory image."),
- clEnumValEnd));
+ "Load, link and verify the resulting memory image.")));
static cl::opt<std::string>
EntryPoint("entry",
OutputFormat("format", cl::desc("Specify output format"),
cl::values(clEnumVal(sysv, "System V format"),
clEnumVal(berkeley, "Berkeley format"),
- clEnumVal(darwin, "Darwin -m format"), clEnumValEnd),
+ clEnumVal(darwin, "Darwin -m format")),
cl::init(berkeley));
static cl::opt<OutputFormatTy> OutputFormatShort(
cl::desc("Specify output format"),
cl::values(clEnumValN(sysv, "A", "System V format"),
clEnumValN(berkeley, "B", "Berkeley format"),
- clEnumValN(darwin, "m", "Darwin -m format"), clEnumValEnd),
+ clEnumValN(darwin, "m", "Darwin -m format")),
cl::init(berkeley));
static bool BerkeleyHeaderPrinted = false;
RadixShort(cl::desc("Print size in radix:"),
cl::values(clEnumValN(octal, "o", "Print size in octal"),
clEnumValN(decimal, "d", "Print size in decimal"),
- clEnumValN(hexadecimal, "x", "Print size in hexadecimal"),
- clEnumValEnd),
+ clEnumValN(hexadecimal, "x", "Print size in hexadecimal")),
cl::init(decimal));
static cl::opt<bool>
clEnumValN(FunctionNameKind::ShortName, "short",
"print short function name"),
clEnumValN(FunctionNameKind::LinkageName, "linkage",
- "print function linkage name"),
- clEnumValEnd));
+ "print function linkage name")));
static cl::opt<bool>
ClUseRelativeAddress("relative-address", cl::init(false),
"REMOVED. Use -symbolize & coverage-report-server.py."),
clEnumValN(SymbolizeAction, "symbolize",
"Produces a symbolized JSON report from binary report."),
- clEnumValN(MergeAction, "merge", "Merges reports."), clEnumValEnd));
+ clEnumValN(MergeAction, "merge", "Merges reports.")));
static cl::list<std::string>
ClInputFiles(cl::Positional, cl::OneOrMore,
clEnumValN(GenAttributes, "gen-attrs",
"Generate attributes"),
clEnumValN(GenSearchableTables, "gen-searchable-tables",
- "Generate generic binary-searchable table"),
- clEnumValEnd));
+ "Generate generic binary-searchable table")));
cl::opt<std::string>
Class("class", cl::desc("Print Enum list for this class"),
cl::values(clEnumValN(VALUE_BASED_ANALYSIS, "value-based",
"Exact dependences without transitive dependences"),
clEnumValN(MEMORY_BASED_ANALYSIS, "memory-based",
- "Overapproximation of dependences"),
- clEnumValEnd),
+ "Overapproximation of dependences")),
cl::Hidden, cl::init(VALUE_BASED_ANALYSIS), cl::ZeroOrMore,
cl::cat(PollyCategory));
" accessed references in the same statement"),
clEnumValN(Dependences::AL_Access, "access-wise",
"Memory reference level analysis that distinguish"
- " access instructions in the same statement"),
- clEnumValEnd),
+ " access instructions in the same statement")),
cl::Hidden, cl::init(Dependences::AL_Statement), cl::ZeroOrMore,
cl::cat(PollyCategory));
clEnumValN(OT_REQUEST, "request",
"Track the overflow bit if requested."),
clEnumValN(OT_ALWAYS, "always",
- "Always track the overflow bit."),
- clEnumValEnd),
+ "Always track the overflow bit.")),
cl::Hidden, cl::init(OT_REQUEST), cl::ZeroOrMore, cl::cat(PollyCategory));
IslExprBuilder::IslExprBuilder(Scop &S, PollyIRBuilder &Builder,
clEnumValN(POSITION_AFTER_LOOPOPT, "after-loopopt",
"After the loop optimizer (but within the inline cycle)"),
clEnumValN(POSITION_BEFORE_VECTORIZER, "before-vectorizer",
- "Right before the vectorizer"),
- clEnumValEnd),
+ "Right before the vectorizer")),
cl::Hidden, cl::init(POSITION_EARLY), cl::ZeroOrMore,
cl::cat(PollyCategory));
static cl::opt<OptimizerChoice> Optimizer(
"polly-optimizer", cl::desc("Select the scheduling optimizer"),
cl::values(clEnumValN(OPTIMIZER_NONE, "none", "No optimizer"),
- clEnumValN(OPTIMIZER_ISL, "isl", "The isl scheduling optimizer"),
- clEnumValEnd),
+ clEnumValN(OPTIMIZER_ISL, "isl", "The isl scheduling optimizer")),
cl::Hidden, cl::init(OPTIMIZER_ISL), cl::ZeroOrMore,
cl::cat(PollyCategory));
"polly-code-generation", cl::desc("How much code-generation to perform"),
cl::values(clEnumValN(CODEGEN_FULL, "full", "AST and IR generation"),
clEnumValN(CODEGEN_AST, "ast", "Only AST generation"),
- clEnumValN(CODEGEN_NONE, "none", "No code generation"),
- clEnumValEnd),
+ clEnumValN(CODEGEN_NONE, "none", "No code generation")),
cl::Hidden, cl::init(CODEGEN_FULL), cl::ZeroOrMore, cl::cat(PollyCategory));
enum TargetChoice { TARGET_CPU, TARGET_GPU };
static cl::opt<TargetChoice>
Target("polly-target", cl::desc("The hardware to target"),
- cl::values(clEnumValN(TARGET_CPU, "cpu", "generate CPU code"),
+ cl::values(clEnumValN(TARGET_CPU, "cpu", "generate CPU code")
#ifdef GPU_CODEGEN
- clEnumValN(TARGET_GPU, "gpu", "generate GPU code"),
+ , clEnumValN(TARGET_GPU, "gpu", "generate GPU code")
#endif
- clEnumValEnd),
+ ),
cl::init(TARGET_CPU), cl::ZeroOrMore, cl::cat(PollyCategory));
VectorizerChoice polly::PollyVectorizerChoice;
clEnumValN(polly::VECTORIZER_POLLY, "polly",
"Polly internal vectorizer"),
clEnumValN(polly::VECTORIZER_STRIPMINE, "stripmine",
- "Strip-mine outer loops for the loop-vectorizer to trigger"),
- clEnumValEnd),
+ "Strip-mine outer loops for the loop-vectorizer to trigger")),
cl::location(PollyVectorizerChoice), cl::init(polly::VECTORIZER_NONE),
cl::ZeroOrMore, cl::cat(PollyCategory));