[llvm-commits] CVS: llvm/include/llvm/Support/CommandLine.h
Jeff Cohen
jeffc at jolt-lang.org
Sun Oct 23 08:23:02 PDT 2005
Changes in directory llvm/include/llvm/Support:
CommandLine.h updated: 1.50 -> 1.51
---
Log message:
Work around GCC's dislike of attributes on function definitions.
---
Diffs of the changes: (+6 -1)
CommandLine.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/Support/CommandLine.h
diff -u llvm/include/llvm/Support/CommandLine.h:1.50 llvm/include/llvm/Support/CommandLine.h:1.51
--- llvm/include/llvm/Support/CommandLine.h:1.50 Sat Oct 22 23:37:19 2005
+++ llvm/include/llvm/Support/CommandLine.h Sun Oct 23 10:22:50 2005
@@ -334,9 +334,14 @@
}
};
+// 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);
More information about the llvm-commits
mailing list