[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Nov 25 18:10:02 PST 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.147 -> 1.148
---
Log message:
output foo(void) as appropriate
---
Diffs of the changes: (+2 -0)
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.147 llvm/lib/CWriter/Writer.cpp:1.148
--- llvm/lib/CWriter/Writer.cpp:1.147 Tue Nov 25 17:44:40 2003
+++ llvm/lib/CWriter/Writer.cpp Tue Nov 25 18:09:17 2003
@@ -941,6 +941,8 @@
if (FT->isVarArg() && !FT->getParamTypes().empty()) {
if (FT->getParamTypes().size()) FunctionInnards << ", ";
FunctionInnards << "..."; // Output varargs portion of signature!
+ } else if (!FT->isVarArg() && FT->getParamTypes().empty()) {
+ FunctionInnards << "void"; // ret() -> ret(void) in C.
}
FunctionInnards << ")";
// Print out the return type and the entire signature for that matter
More information about the llvm-commits
mailing list