diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2010-12-26 22:13:16 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2010-12-26 22:13:16 +0000 |
commit | 168b80f2c0461fded7eb46494e158fa6b71948e4 (patch) | |
tree | 8f2abff2bb480cabebe19304a39b675eb18d284f /clang/lib/CodeGen/CGObjC.cpp | |
parent | 9ae2d05d45f76a86fe220d2f39fe0a042dfc97fa (diff) | |
download | bcm5719-llvm-168b80f2c0461fded7eb46494e158fa6b71948e4.tar.gz bcm5719-llvm-168b80f2c0461fded7eb46494e158fa6b71948e4.zip |
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
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |