From 4961890c0723500bf0bf352873f6eb66ce738c9d Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 4 Nov 2008 05:29:05 +0000 Subject: [PATCH] Fix bug in va_copy llvm-svn: 58680 --- clang/lib/CodeGen/CGBuiltin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 0032cd38beed..98e70e892d38 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -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");