diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 1d499de9a9d4..73a16c4af960 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -334,9 +334,14 @@ public: } }; +// Silly GCC doesn't allow attributes on a function definition. template ValuesClass values(const char *Arg, DataType Val, const char *Desc, - ...) END_WITH_NULL { + ...) END_WITH_NULL; + +template +ValuesClass values(const char *Arg, DataType Val, const char *Desc, + ...) { va_list ValueArgs; va_start(ValueArgs, Desc); ValuesClass Vals(Arg, Val, Desc, ValueArgs);