diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-15 21:39:32 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-15 21:39:32 +0000 |
commit | f5d99dc2cc4a180fe73b575c6cb079a94f0bb949 (patch) | |
tree | 858bc8fdc7537ffd9724629e542da240c7b2ff99 | |
parent | 3846acc98e8af3f6f345972c3d8a5e35f62831de (diff) | |
download | bcm5719-llvm-f5d99dc2cc4a180fe73b575c6cb079a94f0bb949.tar.gz bcm5719-llvm-f5d99dc2cc4a180fe73b575c6cb079a94f0bb949.zip |
The canonical decl for an ObjCImplDecl is it's interface class. Fixes rdar://8728637.
llvm-svn: 135304
-rw-r--r-- | clang/include/clang/AST/DeclObjC.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h index d318fc27a8b..88877cfe0b5 100644 --- a/clang/include/clang/AST/DeclObjC.h +++ b/clang/include/clang/AST/DeclObjC.h @@ -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); |