From: John McCall Date: Wed, 25 Aug 2010 07:03:20 +0000 (+0000) Subject: Remove the DenseSet dependency from Sema.h. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50df6ae41f232612e5e88b19e0db9900d08d2f6c;p=clang Remove the DenseSet dependency from Sema.h. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112030 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 73806a6266..bb0da18092 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -24,7 +24,6 @@ #include "clang/AST/DeclCXX.h" #include "clang/AST/Expr.h" #include "clang/AST/DeclarationName.h" -#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" @@ -33,6 +32,8 @@ namespace llvm { class APSInt; + template struct DenseMapInfo; + template class DenseSet; } namespace clang { @@ -1534,6 +1535,8 @@ public: bool isPropertyReadonly(ObjCPropertyDecl *PropertyDecl, ObjCInterfaceDecl *IDecl); + typedef llvm::DenseSet > SelectorSet; + /// CheckProtocolMethodDefs - This routine checks unimplemented /// methods declared in protocol, and those referenced by it. /// \param IDecl - Used for checking for methods which may have been @@ -1541,8 +1544,8 @@ public: void CheckProtocolMethodDefs(SourceLocation ImpLoc, ObjCProtocolDecl *PDecl, bool& IncompleteImpl, - const llvm::DenseSet &InsMap, - const llvm::DenseSet &ClsMap, + const SelectorSet &InsMap, + const SelectorSet &ClsMap, ObjCContainerDecl *CDecl); /// CheckImplementationIvars - This routine checks if the instance variables @@ -1561,7 +1564,7 @@ public: /// which must be implemented by this implementation. void DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl, ObjCContainerDecl *CDecl, - const llvm::DenseSet& InsMap); + const SelectorSet &InsMap); /// DefaultSynthesizeProperties - This routine default synthesizes all /// properties which must be synthesized in class's @implementation. @@ -1627,10 +1630,10 @@ public: /// MatchAllMethodDeclarations - Check methods declaraed in interface or /// or protocol against those declared in their implementations. - void MatchAllMethodDeclarations(const llvm::DenseSet &InsMap, - const llvm::DenseSet &ClsMap, - llvm::DenseSet &InsMapSeen, - llvm::DenseSet &ClsMapSeen, + void MatchAllMethodDeclarations(const SelectorSet &InsMap, + const SelectorSet &ClsMap, + SelectorSet &InsMapSeen, + SelectorSet &ClsMapSeen, ObjCImplDecl* IMPDecl, ObjCContainerDecl* IDecl, bool &IncompleteImpl, diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 9537ea0032..9fed285064 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -29,6 +29,7 @@ #include "clang/Sema/ParsedTemplate.h" #include "clang/Basic/PartialDiagnostic.h" #include "clang/Lex/Preprocessor.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/STLExtras.h" #include #include diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index e51ce1352c..b4acfbd044 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -19,6 +19,8 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/DeclObjC.h" #include "clang/Sema/DeclSpec.h" +#include "llvm/ADT/DenseSet.h" + using namespace clang; /// ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 0e6a6a4f40..8c8c0073b3 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -26,6 +26,7 @@ #include "clang/AST/ExprCXX.h" #include "clang/Basic/Builtins.h" #include "clang/Basic/LangOptions.h" +#include "llvm/ADT/DenseSet.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/ErrorHandling.h" diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index b9fd4a05d7..6e273f5ee8 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -16,6 +16,7 @@ #include "clang/Sema/Initialization.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/ExprObjC.h" +#include "llvm/ADT/DenseSet.h" using namespace clang;