[cfe-commits] r63251 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Fariborz Jahanian
fjahanian at apple.com
Wed Jan 28 14:46:49 PST 2009
Author: fjahanian
Date: Wed Jan 28 16:46:49 2009
New Revision: 63251
URL: http://llvm.org/viewvc/llvm-project?rev=63251&view=rev
Log:
Add setter/getter methods to the list of methods
of class's meta-data (related to objc2 nonfragile abi).
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=63251&r1=63250&r2=63251&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Wed Jan 28 16:46:49 2009
@@ -3189,6 +3189,21 @@
// 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,
More information about the cfe-commits
mailing list