diff options
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; - } - }; -} |