[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at apoc.cs.uiuc.edu
Fri Sep 20 17:33:01 PDT 2002
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.50 -> 1.51
---
Log message:
Fix bug: 2002-09-20-VarArgPrototypes.ll
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.50 llvm/lib/CWriter/Writer.cpp:1.51
--- llvm/lib/CWriter/Writer.cpp:1.50 Fri Sep 20 10:20:24 2002
+++ llvm/lib/CWriter/Writer.cpp Fri Sep 20 17:32:30 2002
@@ -683,8 +683,10 @@
}
}
- // Finish printing arguments...
- if (FT->isVarArg()) {
+ // Finish printing arguments... if this is a vararg function, print the ...,
+ // unless there are no known types, in which case, we just emit ().
+ //
+ if (FT->isVarArg() && !FT->getParamTypes().empty()) {
if (FT->getParamTypes().size()) Out << ", ";
Out << "..."; // Output varargs portion of signature!
}
More information about the llvm-commits
mailing list