]> granicus.if.org Git - clang/commitdiff
Remove a limited and somewhat questionable DenseMapInfo specialization
authorChandler Carruth <chandlerc@gmail.com>
Wed, 24 Jun 2015 10:24:30 +0000 (10:24 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 24 Jun 2015 10:24:30 +0000 (10:24 +0000)
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

lib/Basic/VirtualFileSystem.cpp

index 8a882e13f7a5e718940a1e8afd07c77d9b510eea..a36102cf0f5abc6bcb14f5d9fd7e7564ec59437f 100644 (file)
@@ -324,20 +324,6 @@ directory_iterator OverlayFileSystem::dir_begin(const Twine &Dir,
 // VFSFromYAML implementation
 //===-----------------------------------------------------------------------===/
 
-// Allow DenseMap<StringRef, ...>.  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<StringRef> {
-    // 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 {