diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-06 05:25:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-06 05:25:03 +0000 |
commit | 5619688510185081cbb4621d703daf7ee24cf39a (patch) | |
tree | 438a34fe8acd9a63f3f9f68cd14aebbc194721a6 /lib | |
parent | b048c9835969c4f7fe06264748be18ed4b442116 (diff) |
Fix a bug I introduced in my const'ification patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index a8ef5aa473..8126485c4f 100644 --- a/lib/AST/DeclObjC.cpp +++ b/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; |