[PATCH] D92627: Basic: Add hashing support for FileEntryRef and DirectoryEntryRef
Duncan P. N. Exon Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 3 19:00:49 PST 2020
dexonsmith created this revision.
dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11.
Herald added a subscriber: ributzka.
dexonsmith requested review of this revision.
Herald added a project: clang.
Allow hashing FileEntryRef and DirectoryEntryRef via `hash_value`, and
use that to implement `DenseMapInfo`. This hash be equal whenever the
entry is the same (the name used to reference it is not relevant).
Also added `DirectoryEntryRef::isSameRef` as a drive-by to facilitate
testing.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92627
Files:
clang/include/clang/Basic/DirectoryEntry.h
clang/include/clang/Basic/FileEntry.h
clang/unittests/Basic/FileEntryTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92627.309440.patch
Type: text/x-patch
Size: 9124 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201204/cbb04204/attachment-0001.bin>
More information about the cfe-commits
mailing list