[PATCH] D109024: [Support] Automatically support `hash_value` when `HashBuilder` support is available.

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 07:58:15 PDT 2021


dexonsmith accepted this revision.
dexonsmith added a comment.
This revision is now accepted and ready to land.

LGTM, with one more inline comment.



================
Comment at: llvm/include/llvm/Support/HashBuilder.h:424-425
+/// is supported.
+using HashCodeHashBuilder = HashBuilder<hashbuilder_detail::HashCodeHasher,
+                                        support::endianness::native>;
+template <typename T>
----------------
Please move this typedef into the detail namespace as well, since it's not intended to be used directly.

Could even be inside `HashCodeHasher`:
```
lang=c++
class HashCodeHasher {
public:
  //...

  using Builder = HashBuilder<...>;
};
```
but up to you.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109024/new/

https://reviews.llvm.org/D109024



More information about the llvm-commits mailing list