llvm.org GIT mirror llvm / 4065ef9
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 Chris Lattner 16 years ago
2 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
11921192
11931193 Out << "va_start(*(va_list*)&" << Mang->getValueName(&I) << ", ";
11941194 // Output the last argument to the enclosing function...
1195 if (I.getParent()->getParent()->aempty()) {
1196 std::cerr << "The C backend does not currently support zero "
1197 << "argument varargs functions, such as '"
1198 << I.getParent()->getParent()->getName() << "'!\n";
1199 abort();
1200 }
11951201 writeOperand(&I.getParent()->getParent()->aback());
11961202 Out << ")";
11971203 return;
11921192
11931193 Out << "va_start(*(va_list*)&" << Mang->getValueName(&I) << ", ";
11941194 // Output the last argument to the enclosing function...
1195 if (I.getParent()->getParent()->aempty()) {
1196 std::cerr << "The C backend does not currently support zero "
1197 << "argument varargs functions, such as '"
1198 << I.getParent()->getParent()->getName() << "'!\n";
1199 abort();
1200 }
11951201 writeOperand(&I.getParent()->getParent()->aback());
11961202 Out << ")";
11971203 return;