[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue May 13 15:16:00 PDT 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.85 -> 1.86
---
Log message:
Fix bug: CBackend/2003-05-13-VarArgFunction.ll
In C, a prototype with no arguments is varargs. A prototype that takes void
has zero args.
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.85 llvm/lib/CWriter/Writer.cpp:1.86
--- llvm/lib/CWriter/Writer.cpp:1.85 Mon May 12 10:39:31 2003
+++ llvm/lib/CWriter/Writer.cpp Tue May 13 15:15:37 2003
@@ -218,8 +218,9 @@
}
if (MTy->isVarArg()) {
if (!MTy->getParamTypes().empty())
- FunctionInards << ", ";
- FunctionInards << "...";
+ FunctionInards << ", ...";
+ } else if (MTy->getParamTypes().empty()) {
+ FunctionInards << "void";
}
FunctionInards << ")";
std::string tstr = FunctionInards.str();
More information about the llvm-commits
mailing list