diff options
Diffstat (limited to 'lib/Target/CBackend/Writer.cpp')
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index f65d3d322e..b1f8793d64 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -1193,6 +1193,12 @@ void CWriter::visitCallInst(CallInst &I) { 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; |