forked from OSchip/llvm-project
Fix ObjCInterfaceDecl::getCategoryMethod() and give it a caller. No behavior change.
llvm-svn: 230928
This commit is contained in:
parent
43e7f96f64
commit
f609839244
|
@ -820,8 +820,8 @@ public:
|
||||||
ObjCMethodDecl *getCategoryInstanceMethod(Selector Sel) const;
|
ObjCMethodDecl *getCategoryInstanceMethod(Selector Sel) const;
|
||||||
ObjCMethodDecl *getCategoryClassMethod(Selector Sel) const;
|
ObjCMethodDecl *getCategoryClassMethod(Selector Sel) const;
|
||||||
ObjCMethodDecl *getCategoryMethod(Selector Sel, bool isInstance) const {
|
ObjCMethodDecl *getCategoryMethod(Selector Sel, bool isInstance) const {
|
||||||
return isInstance ? getInstanceMethod(Sel)
|
return isInstance ? getCategoryInstanceMethod(Sel)
|
||||||
: getClassMethod(Sel);
|
: getCategoryClassMethod(Sel);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef ObjCProtocolList::iterator protocol_iterator;
|
typedef ObjCProtocolList::iterator protocol_iterator;
|
||||||
|
|
|
@ -616,8 +616,7 @@ ObjCMethodDecl *ObjCInterfaceDecl::lookupPrivateMethod(
|
||||||
|
|
||||||
// Look through local category implementations associated with the class.
|
// Look through local category implementations associated with the class.
|
||||||
if (!Method)
|
if (!Method)
|
||||||
Method = Instance ? getCategoryInstanceMethod(Sel)
|
Method = getCategoryMethod(Sel, Instance);
|
||||||
: getCategoryClassMethod(Sel);
|
|
||||||
|
|
||||||
// Before we give up, check if the selector is an instance method.
|
// 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
|
// But only in the root. This matches gcc's behavior and what the
|
||||||
|
|
Loading…
Reference in New Issue