diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/ASTConsumer.h | 5 | ||||
-rw-r--r-- | include/clang/AST/ASTContext.h | 5 | ||||
-rw-r--r-- | include/clang/AST/DeclObjC.h | 47 | ||||
-rw-r--r-- | include/clang/AST/Type.h | 2 |
4 files changed, 5 insertions, 54 deletions
diff --git a/include/clang/AST/ASTConsumer.h b/include/clang/AST/ASTConsumer.h index 3f964ad0e9..b01f6c6001 100644 --- a/include/clang/AST/ASTConsumer.h +++ b/include/clang/AST/ASTConsumer.h @@ -49,11 +49,6 @@ public: /// elements). Use Decl::getNextDeclarator() to walk the chain. virtual void HandleTopLevelDecl(DeclGroupRef D); - /// HandleInterestingDecl - Handle the specified interesting declaration. This - /// is called by the PCH reader when deserializing things that might interest - /// the consumer. The default implementation forwards to HandleTopLevelDecl. - virtual void HandleInterestingDecl(DeclGroupRef D); - /// HandleTranslationUnit - This method is called when the ASTs for entire /// translation unit have been parsed. virtual void HandleTranslationUnit(ASTContext &Ctx) {} diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 31686d89c2..aa1985a888 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -668,10 +668,7 @@ public: unsigned NumArgs, const TemplateArgument *Args); - /// getObjCInterfaceType - Return the unique reference to the type for the - /// specified ObjC interface decl. - QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl, - const ObjCInterfaceDecl *PrevDecl = 0); + QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl); QualType getObjCObjectType(QualType Base, ObjCProtocolDecl * const *Protocols, diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 1fe1cf7cb4..8484216521 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -450,10 +450,7 @@ public: /// Unlike C++, ObjC is a single-rooted class model. In Cocoa, classes /// typically inherit from NSObject (an exception is NSProxy). /// -class ObjCInterfaceDecl : public ObjCContainerDecl, - public Redeclarable<ObjCInterfaceDecl> { - typedef Redeclarable<ObjCInterfaceDecl> redeclarable_base; - +class ObjCInterfaceDecl : public ObjCContainerDecl { /// TypeForDecl - This indicates the Type object that represents this /// TypeDecl. It is a cache maintained by ASTContext::getObjCInterfaceType mutable Type *TypeForDecl; @@ -477,52 +474,15 @@ class ObjCInterfaceDecl : public ObjCContainerDecl, SourceLocation EndLoc; // marks the '>', '}', or identifier. ObjCInterfaceDecl(DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, - SourceLocation CLoc, ObjCInterfaceDecl *PrevDecl, - bool FD, bool isInternal); - -protected: - virtual ObjCInterfaceDecl *getNextRedeclaration() { - return RedeclLink.getNext(); - } + SourceLocation CLoc, bool FD, bool isInternal); public: - typedef redeclarable_base::redecl_iterator redecl_iterator; - redecl_iterator redecls_begin() const { - return redeclarable_base::redecls_begin(); - } - redecl_iterator redecls_end() const { - return redeclarable_base::redecls_end(); - } - static ObjCInterfaceDecl *Create(ASTContext &C, DeclContext *DC, SourceLocation atLoc, IdentifierInfo *Id, - SourceLocation ClassLoc, - ObjCInterfaceDecl *PrevDecl, + SourceLocation ClassLoc = SourceLocation(), bool ForwardDecl = false, bool isInternal = false); - - static ObjCInterfaceDecl *Create(ASTContext &C, EmptyShell Empty); - - void setPreviousDeclaration(ObjCInterfaceDecl *Prev) { - // Adopt a type pointer if it exists. - TypeForDecl = Prev->TypeForDecl; - redeclarable_base::setPreviousDeclaration(Prev); - } - - virtual ObjCInterfaceDecl *getCanonicalDecl() { - return getFirstDeclaration(); - } - const ObjCInterfaceDecl *getCanonicalDecl() const { - return const_cast<ObjCInterfaceDecl*>(this)->getCanonicalDecl(); - } - - /// Get the interface declaration that is a definition, if there is one. - ObjCInterfaceDecl *getDefinition(); - const ObjCInterfaceDecl *getDefinition() const { - return const_cast<ObjCInterfaceDecl*>(this)->getDefinition(); - } - const ObjCProtocolList &getReferencedProtocols() const { return ReferencedProtocols; } @@ -575,7 +535,6 @@ public: ASTContext &C); bool isForwardDecl() const { return ForwardDecl; } - bool isDefinition() const { return !ForwardDecl; } void setForwardDecl(bool val) { ForwardDecl = val; } ObjCInterfaceDecl *getSuperClass() const { return SuperClass; } diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index 6c4ad893b4..7a522f42fa 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -3038,7 +3038,7 @@ class ObjCInterfaceType : public ObjCObjectType { friend class ASTContext; // ASTContext creates these. public: /// getDecl - Get the declaration of this interface. - ObjCInterfaceDecl *getDecl() const; + ObjCInterfaceDecl *getDecl() const { return Decl; } bool isSugared() const { return false; } QualType desugar() const { return QualType(this, 0); } |