]> granicus.if.org Git - clang/commitdiff
Fixes a regression caused by my last patch.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 5 Apr 2011 23:01:27 +0000 (23:01 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 5 Apr 2011 23:01:27 +0000 (23:01 +0000)
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

lib/CodeGen/CGObjC.cpp
test/CodeGenObjC/atomic-aggregate-property.m

index 78305c6ddc69dc93983c8510a2366d27b4ee6903..fed19b4267aa53985bfb9caea7da118d0dd188a0 100644 (file)
@@ -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))) ||
index 93eeca82011758e72c95fcfe7da1cad50475ef8c..2896d379e75a0d8b5897d7f15c37144d3249ac3f 100644 (file)
@@ -1,5 +1,4 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin10  -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o - %s | FileCheck -check-prefix LP64 %s
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10  -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o - %s | FileCheck -check-prefix LP64 %s
 // rdar: // 7849824
 
 struct s {