Fix ObjCInterfaceDecl::getCategoryMethod() and give it a caller. No behavior change.

llvm-svn: 230928
This commit is contained in:
Nico Weber 2015-03-02 01:12:28 +00:00
parent 43e7f96f64
commit f609839244
2 changed files with 3 additions and 4 deletions

View File

@ -820,8 +820,8 @@ public:
ObjCMethodDecl *getCategoryInstanceMethod(Selector Sel) const;
ObjCMethodDecl *getCategoryClassMethod(Selector Sel) const;
ObjCMethodDecl *getCategoryMethod(Selector Sel, bool isInstance) const {
return isInstance ? getInstanceMethod(Sel)
: getClassMethod(Sel);
return isInstance ? getCategoryInstanceMethod(Sel)
: getCategoryClassMethod(Sel);
}
typedef ObjCProtocolList::iterator protocol_iterator;

View File

@ -616,8 +616,7 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupPrivateMethod(
// Look through local category implementations associated with the class.
if (!Method)
Method = Instance ? getCategoryInstanceMethod(Sel)
: getCategoryClassMethod(Sel);
Method = getCategoryMethod(Sel, Instance);
// Before we give up, check if the selector is an instance method.
// But only in the root. This matches gcc's behavior and what the