aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2005-10-23 15:22:50 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2005-10-23 15:22:50 +0000
commitcc94b5178f729390fd72c69b45ead9491129bb85 (patch)
tree8d3569eb5dc60bdedd5dfddba98aaa97f139f25a /include/llvm/Support
parentfec735fb84dbf2e8ab91edfd4aa81a96467fb92b (diff)
downloadexternal_llvm-cc94b5178f729390fd72c69b45ead9491129bb85.zip
external_llvm-cc94b5178f729390fd72c69b45ead9491129bb85.tar.gz
external_llvm-cc94b5178f729390fd72c69b45ead9491129bb85.tar.bz2
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
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/CommandLine.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index 1d499de..73a16c4 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<class DataType>
ValuesClass<DataType> values(const char *Arg, DataType Val, const char *Desc,
- ...) END_WITH_NULL {
+ ...) END_WITH_NULL;
+
+template<class DataType>
+ValuesClass<DataType> values(const char *Arg, DataType Val, const char *Desc,
+ ...) {
va_list ValueArgs;
va_start(ValueArgs, Desc);
ValuesClass<DataType> Vals(Arg, Val, Desc, ValueArgs);