[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 23 13:40:01 PDT 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.136 -> 1.137
---
Log message:
Fail gracefully if we have a zero arg varargs function
---
Diffs of the changes: (+6 -0)
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.136 llvm/lib/CWriter/Writer.cpp:1.137
--- llvm/lib/CWriter/Writer.cpp:1.136 Mon Oct 20 14:43:15 2003
+++ llvm/lib/CWriter/Writer.cpp Thu Oct 23 13:39:22 2003
@@ -1193,6 +1193,12 @@
Out << "va_start(*(va_list*)&" << Mang->getValueName(&I) << ", ";
// Output the last argument to the enclosing function...
+ if (I.getParent()->getParent()->aempty()) {
+ std::cerr << "The C backend does not currently support zero "
+ << "argument varargs functions, such as '"
+ << I.getParent()->getParent()->getName() << "'!\n";
+ abort();
+ }
writeOperand(&I.getParent()->getParent()->aback());
Out << ")";
return;
More information about the llvm-commits
mailing list