aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-01-28 22:46:49 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-01-28 22:46:49 +0000
commit939abced90071beb750041ee9c2cf57f827e024a (patch)
tree9015715515ddb0b8e5ee242723881af294d5c37b /lib/CodeGen/CGObjCMac.cpp
parentea4bc889a6a253ae20a73105b98236d18e550411 (diff)
Add setter/getter methods to the list of methods
of class's meta-data (related to objc2 nonfragile abi). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index acd5315842..8ffed61857 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -3189,6 +3189,21 @@ llvm::GlobalVariable * CGObjCNonFragileABIMac::BuildClassRoTInitializer(
// Instance methods should always be defined.
Methods.push_back(GetMethodConstant(*i));
}
+ for (ObjCImplementationDecl::propimpl_iterator i = ID->propimpl_begin(),
+ e = ID->propimpl_end(); i != e; ++i) {
+ ObjCPropertyImplDecl *PID = *i;
+
+ if (PID->getPropertyImplementation() == ObjCPropertyImplDecl::Synthesize){
+ ObjCPropertyDecl *PD = PID->getPropertyDecl();
+
+ if (ObjCMethodDecl *MD = PD->getGetterMethodDecl())
+ if (llvm::Constant *C = GetMethodConstant(MD))
+ Methods.push_back(C);
+ if (ObjCMethodDecl *MD = PD->getSetterMethodDecl())
+ if (llvm::Constant *C = GetMethodConstant(MD))
+ Methods.push_back(C);
+ }
+ }
}
// FIXME. Section may always be .data
Values[ 5] = EmitMethodList(MethodListName,