aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-11-04 05:29:05 +0000
committerAnders Carlsson <andersca@mac.com>2008-11-04 05:29:05 +0000
commitd9641f8dad2eb11ad5f035a41f88c4259b80cd90 (patch)
treeb3d497a3fa1f35a630bea416ddecd084cfe95158 /lib/CodeGen/CGBuiltin.cpp
parent7cf95092bffea9d6c51343422c7257b4558899d6 (diff)
Fix bug in va_copy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--lib/CodeGen/CGBuiltin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 0032cd38be..98e70e892d 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/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");