[cfe-commits] r77296 - /cfe/trunk/lib/AST/DeclObjC.cpp

Argiris Kirtzidis akyrtzi at gmail.com
Mon Jul 27 22:10:54 PDT 2009


Author: akirtzidis
Date: Tue Jul 28 00:10:52 2009
New Revision: 77296

URL: http://llvm.org/viewvc/llvm-project?rev=77296&view=rev
Log:
Use ObjCImplDecl in place of ObjCCategoryImplDecl/ObjCImplementationDecl.

Modified:
    cfe/trunk/lib/AST/DeclObjC.cpp

Modified: cfe/trunk/lib/AST/DeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclObjC.cpp?rev=77296&r1=77295&r2=77296&view=diff

==============================================================================
--- cfe/trunk/lib/AST/DeclObjC.cpp (original)
+++ cfe/trunk/lib/AST/DeclObjC.cpp Tue Jul 28 00:10:52 2009
@@ -286,12 +286,10 @@
     return ID;
   if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(getDeclContext()))
     return CD->getClassInterface();
-  if (ObjCImplementationDecl *IMD = 
-      dyn_cast<ObjCImplementationDecl>(getDeclContext()))
+  if (ObjCImplDecl *IMD = dyn_cast<ObjCImplDecl>(getDeclContext()))
     return IMD->getClassInterface();
-  if (ObjCCategoryImplDecl *CID = 
-      dyn_cast<ObjCCategoryImplDecl>(getDeclContext()))
-    return CID->getClassInterface();
+
+  assert(!isa<ObjCProtocolDecl>(getDeclContext()) && "It's a protocol method");
   assert(false && "unknown method context");
   return 0;
 }





More information about the cfe-commits mailing list