Paper over CBackend/2004-08-09-va-end-null.ll

Note that this indicates a serious problem with the way we are emitting varargs,
but this should not be properly fixed until after 1.3.

This patch SHOULD go into 1.3.

llvm-svn: 15602
This commit is contained in:
Chris Lattner 2004-08-10 00:19:16 +00:00
parent cee3c6b1be
commit 1d787355e7
1 changed files with 7 additions and 3 deletions

View File

@ -1390,9 +1390,13 @@ void CWriter::visitCallInst(CallInst &I) {
Out << ")";
return;
case Intrinsic::vaend:
if (!isa<ConstantPointerNull>(I.getOperand(1))) {
Out << "va_end(*(va_list*)&";
writeOperand(I.getOperand(1));
Out << ")";
} else {
Out << "va_end(*(va_list*)0)";
}
return;
case Intrinsic::vacopy:
Out << "0;";