mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Fail gracefully if we have a zero arg varargs function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eaa35bb794
commit
4065ef99f9
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user