summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclObjC.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-28 05:10:52 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2009-07-28 05:10:52 +0000
commit2cee40daa7ef3c48276e6bb6a8e0608db248b34f (patch)
tree5f345fd5fd573d6b53c38ef7aca4376f5794384b /clang/lib/AST/DeclObjC.cpp
parente1a70c964f454dae2faba09ba84d0f0a771fa8bd (diff)
downloadbcm5719-llvm-2cee40daa7ef3c48276e6bb6a8e0608db248b34f.tar.gz
bcm5719-llvm-2cee40daa7ef3c48276e6bb6a8e0608db248b34f.zip
Use ObjCImplDecl in place of ObjCCategoryImplDecl/ObjCImplementationDecl.
llvm-svn: 77296
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r--clang/lib/AST/DeclObjC.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index e082a41551b..503bc7052dc 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -286,12 +286,10 @@ ObjCInterfaceDecl *ObjCMethodDecl::getClassInterface() {
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;
}
OpenPOWER on IntegriCloud