summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-06 05:25:03 +0000
committerChris Lattner <sabre@nondot.org>2008-04-06 05:25:03 +0000
commit713e6592be2b4a2e60f6b50ecbf209d90c0eb546 (patch)
tree4ff06f38d1d9fbaaff4a6c1a2e830af0c52a7dc9 /clang/lib
parent0a5ff0d34aca98c70cd72c777c95622acedc6f50 (diff)
downloadbcm5719-llvm-713e6592be2b4a2e60f6b50ecbf209d90c0eb546.tar.gz
bcm5719-llvm-713e6592be2b4a2e60f6b50ecbf209d90c0eb546.zip
Fix a bug I introduced in my const'ification patch.
llvm-svn: 49262
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/DeclObjC.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp
index a8ef5aa473b..8126485c4ff 100644
--- a/clang/lib/AST/DeclObjC.cpp
+++ b/clang/lib/AST/DeclObjC.cpp
@@ -417,16 +417,15 @@ unsigned ObjCMethodDecl::getSynthesizedMethodSize() const {
return length;
}
-const ObjCInterfaceDecl *ObjCMethodDecl::getClassInterface() const {
+ObjCInterfaceDecl *ObjCMethodDecl::getClassInterface() {
if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(MethodContext))
return ID;
if (ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(MethodContext))
return CD->getClassInterface();
if (ObjCImplementationDecl *IMD =
- dyn_cast<ObjCImplementationDecl>(MethodContext))
+ dyn_cast<ObjCImplementationDecl>(MethodContext))
return IMD->getClassInterface();
- if (ObjCCategoryImplDecl *CID =
- dyn_cast<ObjCCategoryImplDecl>(MethodContext))
+ if (ObjCCategoryImplDecl *CID = dyn_cast<ObjCCategoryImplDecl>(MethodContext))
return CID->getClassInterface();
assert(false && "unknown method context");
return 0;
OpenPOWER on IntegriCloud