diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-09-20 22:32:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-09-20 22:32:30 +0000 |
| commit | 79ea4c4aa24e855c1ab5e2a64592921ae1dea9cc (patch) | |
| tree | 7b7efea6387e36b9b6c98245ac219b12b6990ecd /llvm/lib/CWriter/Writer.cpp | |
| parent | 6e1f8c59638e3c69f1674d051ff9f4caa995aa6f (diff) | |
| download | bcm5719-llvm-79ea4c4aa24e855c1ab5e2a64592921ae1dea9cc.tar.gz bcm5719-llvm-79ea4c4aa24e855c1ab5e2a64592921ae1dea9cc.zip | |
Fix bug: 2002-09-20-VarArgPrototypes.ll
llvm-svn: 3870
Diffstat (limited to 'llvm/lib/CWriter/Writer.cpp')
| -rw-r--r-- | llvm/lib/CWriter/Writer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CWriter/Writer.cpp b/llvm/lib/CWriter/Writer.cpp index 7501a9bfde2..e993b740f41 100644 --- a/llvm/lib/CWriter/Writer.cpp +++ b/llvm/lib/CWriter/Writer.cpp @@ -683,8 +683,10 @@ void CWriter::printFunctionSignature(const Function *F, bool Prototype) { } } - // 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! } |

