Add setter/getter methods to the list of methods

of class's meta-data (related to objc2 nonfragile abi).

llvm-svn: 63251
This commit is contained in:
Fariborz Jahanian 2009-01-28 22:46:49 +00:00
parent b4dd3f8685
commit d27a820ae2
1 changed files with 15 additions and 0 deletions

View File

@ -3189,6 +3189,21 @@ llvm::GlobalVariable * CGObjCNonFragileABIMac::BuildClassRoTInitializer(
// Instance methods should always be defined. // Instance methods should always be defined.
Methods.push_back(GetMethodConstant(*i)); 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 // FIXME. Section may always be .data
Values[ 5] = EmitMethodList(MethodListName, Values[ 5] = EmitMethodList(MethodListName,