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 | ea70eb30a030b5ac3afb32c5d91ec2a4f580511d (patch) | |
tree | 95c1a2686e2d3c03ea5e0c55e5ccd8df60f54df1 /clang/lib/AST/DeclObjC.cpp | |
parent | e901b5fda27e7fe90214dea0af5f9f9537836123 (diff) | |
download | bcm5719-llvm-ea70eb30a030b5ac3afb32c5d91ec2a4f580511d.tar.gz bcm5719-llvm-ea70eb30a030b5ac3afb32c5d91ec2a4f580511d.zip |
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.
llvm-svn: 169092
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index 65a987836ff..2b7b13b43fa 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/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) |