diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-01 15:09:41 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-12-01 15:09:41 +0000 |
commit | 2fa67efeaf66a9332c30a026dc1c21bef6c33a6c (patch) | |
tree | 80969d778f42369e9172593b4ce8d362e9a7954e /lib/AST/DeclObjC.cpp | |
parent | ac5586591aacfe86e14aab3d2524a2d5b936efd4 (diff) |
Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't pull in all the generated Attr code.
Required to pull some functions out of line, but this shouldn't have a perf impact.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 65a987836f..2b7b13b43f 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -13,8 +13,9 @@ #include "clang/AST/DeclObjC.h" #include "clang/AST/ASTContext.h" -#include "clang/AST/Stmt.h" #include "clang/AST/ASTMutationListener.h" +#include "clang/AST/Attr.h" +#include "clang/AST/Stmt.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" using namespace clang; @@ -205,6 +206,26 @@ void ObjCInterfaceDecl::collectPropertiesToImplement(PropertyMap &PM) const { // explicitly, have to search class extension properties. } +bool ObjCInterfaceDecl::isArcWeakrefUnavailable() const { + const ObjCInterfaceDecl *Class = this; + while (Class) { + if (Class->hasAttr<ArcWeakrefUnavailableAttr>()) + return true; + Class = Class->getSuperClass(); + } + return false; +} + +const ObjCInterfaceDecl *ObjCInterfaceDecl::isObjCRequiresPropertyDefs() const { + const ObjCInterfaceDecl *Class = this; + while (Class) { + if (Class->hasAttr<ObjCRequiresPropertyDefsAttr>()) + return Class; + Class = Class->getSuperClass(); + } + return 0; +} + void ObjCInterfaceDecl::mergeClassExtensionProtocolList( ObjCProtocolDecl *const* ExtList, unsigned ExtNum, ASTContext &C) |