Fix bug in va_copy

llvm-svn: 58680
This commit is contained in:
Anders Carlsson 2008-11-04 05:29:05 +00:00
parent a69d8c50dc
commit 4961890c07

View File

@ -66,7 +66,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) {
}
case Builtin::BI__builtin_va_copy: {
// FIXME: This does not yet handle architectures where va_list is a struct.
Value *DstPtr = EmitScalarExpr(E->getArg(0));
Value *DstPtr = EmitLValue(E->getArg(0)).getAddress();
Value *SrcValue = EmitScalarExpr(E->getArg(1));
Value *SrcPtr = CreateTempAlloca(SrcValue->getType(), "dst_ptr");