Do not emit warning about vararg for PPC64

This commit is contained in:
kai
2013-03-30 14:11:44 +01:00
parent ec0bc749d0
commit 971dc95c74

View File

@@ -61,8 +61,9 @@ DValue* DtoVaArg(Loc& loc, Type* type, Expression* valistArg)
if (DtoIsPassedByRef(type))
llt = getPtrToType(llt);
// issue a warning for broken va_arg instruction.
if (global.params.targetTriple.getArch() != llvm::Triple::x86)
warning(Loc(), "%s: va_arg for C variadic functions is probably broken for anything but x86", loc.toChars());
if (global.params.targetTriple.getArch() != llvm::Triple::x86
&& global.params.targetTriple.getArch() != llvm::Triple::ppc64)
warning(Loc(), "%s: va_arg for C variadic functions is probably broken for anything but x86 and ppc64", loc.toChars());
// done
return new DImValue(type, gIR->ir->CreateVAArg(expelem->getLVal(), llt, "tmp"));
}