From 168b80f2c0461fded7eb46494e158fa6b71948e4 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 26 Dec 2010 22:13:16 +0000 Subject: Add support for GNU runtime property set / get structure functions. Minor refactoring of Mac runtime (returns the same function for both, as the Mac runtimes currently only provide a single entry point for setting and getting struct properties, although this will presumably be fixed at some point). llvm-svn: 122569 --- clang/lib/CodeGen/CGObjC.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'clang/lib/CodeGen/CGObjC.cpp') diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index 91042dae4b3..456aceda69f 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -222,11 +222,11 @@ void CodeGenFunction::GenerateObjCGetter(ObjCImplementationDecl *IMP, bool IsStrong = false; if ((IsAtomic || (IsStrong = IvarTypeWithAggrGCObjects(Ivar->getType()))) && CurFnInfo->getReturnInfo().getKind() == ABIArgInfo::Indirect - && CGM.getObjCRuntime().GetCopyStructFunction()) { + && CGM.getObjCRuntime().GetGetStructFunction()) { LValue LV = EmitLValueForIvar(TypeOfSelfObject(), LoadObjCSelf(), Ivar, 0); llvm::Value *GetCopyStructFn = - CGM.getObjCRuntime().GetCopyStructFunction(); + CGM.getObjCRuntime().GetGetStructFunction(); CodeGenTypes &Types = CGM.getTypes(); // objc_copyStruct (ReturnValue, &structIvar, // sizeof (Type of Ivar), isAtomic, false); @@ -353,11 +353,11 @@ void CodeGenFunction::GenerateObjCSetter(ObjCImplementationDecl *IMP, } else if (IsAtomic && hasAggregateLLVMType(Ivar->getType()) && !Ivar->getType()->isAnyComplexType() && IndirectObjCSetterArg(*CurFnInfo) - && CGM.getObjCRuntime().GetCopyStructFunction()) { + && CGM.getObjCRuntime().GetSetStructFunction()) { // objc_copyStruct (&structIvar, &Arg, // sizeof (struct something), true, false); llvm::Value *GetCopyStructFn = - CGM.getObjCRuntime().GetCopyStructFunction(); + CGM.getObjCRuntime().GetSetStructFunction(); CodeGenTypes &Types = CGM.getTypes(); CallArgList Args; LValue LV = EmitLValueForIvar(TypeOfSelfObject(), LoadObjCSelf(), Ivar, 0); -- cgit v1.2.3