diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-05 23:01:27 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-05 23:01:27 +0000 |
commit | 5fb6509b402d052aa661b15bfa5b71b7cdd7d0e9 (patch) | |
tree | b476cb80fdb0530ab664686603650e7780b3fade /lib/CodeGen/CGObjC.cpp | |
parent | 5ecb1dfb303c58138fdabeea00e73bee075b21ee (diff) |
Fixes a regression caused by my last patch.
As a result, I had to remove a c++ version of a clang
test which requires more scrutiny on my part.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 78305c6ddc..fed19b4267 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -287,7 +287,7 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP, } else if (hasAggregateLLVMType(IVART)) { bool IsStrong = false; - if ((IsAtomic || (IsStrong = IvarTypeWithAggrGCObjects(IVART))) + if ((IsStrong = IvarTypeWithAggrGCObjects(IVART)) && CurFnInfo->getReturnInfo().getKind() == ABIArgInfo::Indirect && CGM.getObjCRuntime().GetGetStructFunction()) { GenerateObjCGetterBody(Ivar, IsAtomic, IsStrong); @@ -448,6 +448,7 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP, ReturnValueSlot(), Args); } else if (IsAtomic && hasAggregateLLVMType(IVART) && !IVART->isAnyComplexType() && + !PID->getGetterCXXConstructor() && ((Triple.getArch() == llvm::Triple::x86 && (getContext().getTypeSizeInChars(IVART) > CharUnits::fromQuantity(4))) || |