[cfe-commits] r62017 - /cfe/trunk/lib/CodeGen/CGObjC.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Jan 9 16:13:01 PST 2009
Author: fjahanian
Date: Fri Jan 9 18:13:01 2009
New Revision: 62017
URL: http://llvm.org/viewvc/llvm-project?rev=62017&view=rev
Log:
assert if attempting to code gen. a property setter/getter
coming from a protocol.
Modified:
cfe/trunk/lib/CodeGen/CGObjC.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=62017&r1=62016&r2=62017&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Fri Jan 9 18:13:01 2009
@@ -143,6 +143,8 @@
const ObjCPropertyDecl *PD = PID->getPropertyDecl();
ObjCMethodDecl *OMD = PD->getGetterMethodDecl();
assert(OMD && "Invalid call to generate getter (empty method)");
+ assert (!dyn_cast<ObjCProtocolDecl>(OMD->getDeclContext()) &&
+ "GenerateObjCMethod - cannot synthesize protocol getter");
// FIXME: This is rather murky, we create this here since they will
// not have been created by Sema for us.
OMD->createImplicitParams(getContext(), IMP->getClassInterface());
@@ -213,6 +215,8 @@
const ObjCPropertyDecl *PD = PID->getPropertyDecl();
ObjCMethodDecl *OMD = PD->getSetterMethodDecl();
assert(OMD && "Invalid call to generate setter (empty method)");
+ assert (!dyn_cast<ObjCProtocolDecl>(OMD->getDeclContext()) &&
+ "GenerateObjCSetter - cannot synthesize protocol setter");
// FIXME: This is rather murky, we create this here since they will
// not have been created by Sema for us.
OMD->createImplicitParams(getContext(), IMP->getClassInterface());
More information about the cfe-commits
mailing list