[cfe-commits] r58680 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Anders Carlsson andersca at mac.com
Mon Nov 3 21:29:08 PST 2008


Author: andersca
Date: Mon Nov  3 23:29:05 2008
New Revision: 58680

URL: http://llvm.org/viewvc/llvm-project?rev=58680&view=rev
Log:
Fix bug in va_copy

Modified:
    cfe/trunk/lib/CodeGen/CGBuiltin.cpp

Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=58680&r1=58679&r2=58680&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Mon Nov  3 23:29:05 2008
@@ -66,7 +66,7 @@
   }
   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");





More information about the cfe-commits mailing list