From: Bob Wilson Date: Sat, 22 Oct 2011 21:42:34 +0000 (+0000) Subject: Fix a typo that completely broke the expansion of complex arguments. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bfcacd9e00015b9b8e1a027639000fdbaa398194;p=clang Fix a typo that completely broke the expansion of complex arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142734 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 6ae2d0c967..f9eaedab18 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -366,7 +366,7 @@ CodeGenFunction::ExpandTypeFromArgs(QualType Ty, LValue LV, QualType EltTy = CT->getElementType(); llvm::Value *RealAddr = Builder.CreateStructGEP(Addr, 0, "real"); EmitStoreThroughLValue(RValue::get(AI++), MakeAddrLValue(RealAddr, EltTy)); - llvm::Value *ImagAddr = Builder.CreateStructGEP(Addr, 0, "imag"); + llvm::Value *ImagAddr = Builder.CreateStructGEP(Addr, 1, "imag"); EmitStoreThroughLValue(RValue::get(AI++), MakeAddrLValue(ImagAddr, EltTy)); } else { EmitStoreThroughLValue(RValue::get(AI), LV);