diff options
author | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-12-22 00:07:40 +0000 |
commit | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (patch) | |
tree | df8df0b0067b381eab470a3b8f28d14a552a6340 /tools/libclang/IndexingContext.h | |
parent | ea266cad53e3d49771fa38103913d3ec7a166694 (diff) | |
download | FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.zip FreeBSD-src-952eddef9aff85b1e92626e89baaf7a360e2ac85.tar.gz |
Vendor import of clang release_34 branch r197841 (effectively, 3.4 RC3):
https://llvm.org/svn/llvm-project/cfe/branches/release_34@197841
Diffstat (limited to 'tools/libclang/IndexingContext.h')
-rw-r--r-- | tools/libclang/IndexingContext.h | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/tools/libclang/IndexingContext.h b/tools/libclang/IndexingContext.h index 62873be..3437d55 100644 --- a/tools/libclang/IndexingContext.h +++ b/tools/libclang/IndexingContext.h @@ -270,14 +270,6 @@ public: } }; -struct RefFileOccurence { - const FileEntry *File; - const Decl *Dcl; - - RefFileOccurence(const FileEntry *File, const Decl *Dcl) - : File(File), Dcl(Dcl) { } -}; - class IndexingContext { ASTContext *Ctx; CXClientData ClientData; @@ -294,6 +286,7 @@ class IndexingContext { ContainerMapTy ContainerMap; EntityMapTy EntityMap; + typedef std::pair<const FileEntry *, const Decl *> RefFileOccurence; llvm::DenseSet<RefFileOccurence> RefFileOccurences; std::deque<DeclGroupRef> TUDeclsInObjCContainer; @@ -524,29 +517,3 @@ inline T *ScratchAlloc::allocate() { } }} // end clang::cxindex - -namespace llvm { - /// Define DenseMapInfo so that FileID's can be used as keys in DenseMap and - /// DenseSets. - template <> - struct DenseMapInfo<clang::cxindex::RefFileOccurence> { - static inline clang::cxindex::RefFileOccurence getEmptyKey() { - return clang::cxindex::RefFileOccurence(0, 0); - } - - static inline clang::cxindex::RefFileOccurence getTombstoneKey() { - return clang::cxindex::RefFileOccurence((const clang::FileEntry *)~0, - (const clang::Decl *)~0); - } - - static unsigned getHashValue(clang::cxindex::RefFileOccurence S) { - typedef std::pair<const clang::FileEntry *, const clang::Decl *> PairTy; - return DenseMapInfo<PairTy>::getHashValue(PairTy(S.File, S.Dcl)); - } - - static bool isEqual(clang::cxindex::RefFileOccurence LHS, - clang::cxindex::RefFileOccurence RHS) { - return LHS.File == RHS.File && LHS.Dcl == RHS.Dcl; - } - }; -} |