From: Jeff Cohen Date: Sun, 23 Oct 2005 15:22:50 +0000 (+0000) Subject: Work around GCC's dislike of attributes on function definitions. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cc94b5178f729390fd72c69b45ead9491129bb85;p=oota-llvm.git Work around GCC's dislike of attributes on function definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23896 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 1d499de9a9d..73a16c4af96 100644 --- a/include/llvm/Support/CommandLine.h +++ b/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);