summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/CommandLine.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-24 05:03:46 +0000
committerChris Lattner <sabre@nondot.org>2005-10-24 05:03:46 +0000
commite175996c9ad2513fd90ea70b87ee83e11e8e0c87 (patch)
treea3896249b4a787ed80c27cd4505334f97abe07e8 /llvm/include/llvm/Support/CommandLine.h
parent2a65d7b633a82569d0587cc30ce41ac3c428a4a8 (diff)
downloadbcm5719-llvm-e175996c9ad2513fd90ea70b87ee83e11e8e0c87.tar.gz
bcm5719-llvm-e175996c9ad2513fd90ea70b87ee83e11e8e0c87.zip
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. llvm-svn: 23957
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r--llvm/include/llvm/Support/CommandLine.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h
index 73a16c4af96..993d93f4f66 100644
--- a/llvm/include/llvm/Support/CommandLine.h
+++ b/llvm/include/llvm/Support/CommandLine.h
@@ -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);
OpenPOWER on IntegriCloud