r240530 - Remove a limited and somewhat questionable DenseMapInfo specialization
Chandler Carruth
chandlerc at gmail.com
Wed Jun 24 03:24:31 PDT 2015
Author: chandlerc
Date: Wed Jun 24 05:24:30 2015
New Revision: 240530
URL: http://llvm.org/viewvc/llvm-project?rev=240530&view=rev
Log:
Remove a limited and somewhat questionable DenseMapInfo specialization
for StringRef now that the core DenseMap library provides this facility.
Modified:
cfe/trunk/lib/Basic/VirtualFileSystem.cpp
Modified: cfe/trunk/lib/Basic/VirtualFileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/VirtualFileSystem.cpp?rev=240530&r1=240529&r2=240530&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/VirtualFileSystem.cpp (original)
+++ cfe/trunk/lib/Basic/VirtualFileSystem.cpp Wed Jun 24 05:24:30 2015
@@ -324,20 +324,6 @@ directory_iterator OverlayFileSystem::di
// 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 {
More information about the cfe-commits
mailing list