From: Chandler Carruth Date: Wed, 24 Jun 2015 10:24:30 +0000 (+0000) Subject: Remove a limited and somewhat questionable DenseMapInfo specialization X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=491c50981eecfd72622f115e991c9a0b9f421a04;p=clang Remove a limited and somewhat questionable DenseMapInfo specialization for StringRef now that the core DenseMap library provides this facility. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240530 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/VirtualFileSystem.cpp b/lib/Basic/VirtualFileSystem.cpp index 8a882e13f7..a36102cf0f 100644 --- a/lib/Basic/VirtualFileSystem.cpp +++ b/lib/Basic/VirtualFileSystem.cpp @@ -324,20 +324,6 @@ directory_iterator OverlayFileSystem::dir_begin(const Twine &Dir, // VFSFromYAML implementation //===-----------------------------------------------------------------------===/ -// Allow DenseMap. This is useful below because we know all the -// strings are literals and will outlive the map, and there is no reason to -// store them. -namespace llvm { - template<> - struct DenseMapInfo { - // This assumes that "" will never be a valid key. - static inline StringRef getEmptyKey() { return StringRef(""); } - static inline StringRef getTombstoneKey() { return StringRef(); } - static unsigned getHashValue(StringRef Val) { return HashString(Val); } - static bool isEqual(StringRef LHS, StringRef RHS) { return LHS == RHS; } - }; -} - namespace { enum EntryKind {