aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-10-22 21:42:34 +0000
committerBob Wilson <bob.wilson@apple.com>2011-10-22 21:42:34 +0000
commitbfcacd9e00015b9b8e1a027639000fdbaa398194 (patch)
treed859e154a42af442101ec24236e00194a396aa25 /lib/CodeGen/CGCall.cpp
parent07fc657e3077531805b0e2dbf8f8964d48daa38b (diff)
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
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp2
1 files changed, 1 insertions, 1 deletions
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);