mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-13 05:40:59 +00:00
Remove a limited and somewhat questionable DenseMapInfo specialization
for StringRef now that the core DenseMap library provides this facility. llvm-svn: 240530
This commit is contained in:
parent
d7a32ea4b8
commit
c026e39451
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user