Move the END_WITH_NULL marker. Vladimir suggests that this works better with
authorChris Lattner <sabre@nondot.org>
Mon, 24 Oct 2005 05:03:46 +0000 (05:03 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 24 Oct 2005 05:03:46 +0000 (05:03 +0000)
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

index 73a16c4af9600f7ba408524fef33b0ffb3d8ff1d..993d93f4f667155f96a5b68e956647c9dd9f3bba 100644 (file)
@@ -334,14 +334,9 @@ public:
   }
 };
 
-// Silly GCC doesn't allow attributes on a function definition.
 template<class DataType>
-ValuesClass<DataType> values(const char *Arg, DataType Val, const char *Desc,
-                             ...) END_WITH_NULL;
-
-template<class DataType>
-ValuesClass<DataType> values(const char *Arg, DataType Val, const char *Desc,
-                             ...) {
+ValuesClass<DataType> END_WITH_NULL values(const char *Arg, DataType Val, 
+                                           const char *Desc, ...) {
     va_list ValueArgs;
     va_start(ValueArgs, Desc);
     ValuesClass<DataType> Vals(Arg, Val, Desc, ValueArgs);