aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2010-12-26 22:13:16 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2010-12-26 22:13:16 +0000
commit8fac25d33b13e25f512dd921d4d5a4b565f5d175 (patch)
treea5cf55e1cac1cb8627840e240d69ccd5ec6752ec /lib/CodeGen/CGObjC.cpp
parentc7ff82c2040f45eaad2eddea0e4461dddc972cd1 (diff)
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).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 91042dae4b..456aceda69 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/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);