From a542b4c133de5da974632e9623ee4b426ebb3353 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 24 Oct 2005 05:03:46 +0000 Subject: [PATCH] Move the END_WITH_NULL marker. Vladimir suggests that this works better with GCC 4.1. I tried it with 4.0 and 3.3 and it seems fine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23957 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CommandLine.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 73a16c4af96..993d93f4f66 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -334,14 +334,9 @@ 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; - -template -ValuesClass values(const char *Arg, DataType Val, const char *Desc, - ...) { +ValuesClass END_WITH_NULL values(const char *Arg, DataType Val, + const char *Desc, ...) { va_list ValueArgs; va_start(ValueArgs, Desc); ValuesClass Vals(Arg, Val, Desc, ValueArgs); -- 2.34.1