The canonical decl for an ObjCImplDecl is it's interface class. Fixes rdar://8728637.

llvm-svn: 135304
This commit is contained in:
Argyrios Kyrtzidis 2011-07-15 21:39:32 +00:00
parent 3846acc98e
commit f5d99dc2cc
1 changed files with 6 additions and 0 deletions

View File

@ -1122,6 +1122,12 @@ protected:
ClassInterface(classInterface) {}
public:
virtual Decl *getCanonicalDecl() {
if (Decl *interface = getClassInterface())
return interface;
return this;
}
const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
void setClassInterface(ObjCInterfaceDecl *IFace);