[libcxx-commits] [clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)
Erich Keane via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 18 11:14:51 PDT 2025
================
@@ -51,6 +51,27 @@ class FixedPointSemantics;
struct fltSemantics;
template <typename T, unsigned N> class SmallPtrSet;
+template <> struct DenseMapInfo<llvm::FoldingSetNodeID> {
+ static FoldingSetNodeID getEmptyKey() { return FoldingSetNodeID{}; }
+
+ static FoldingSetNodeID getTombstoneKey() {
+ FoldingSetNodeID id;
+ for (size_t i = 0; i < sizeof(id) / sizeof(unsigned); ++i) {
+ id.AddInteger(std::numeric_limits<unsigned>::max());
----------------
erichkeane wrote:
Ooof... this is a little opaque. Perhaps instead `FoldingSetNodeID` should have a 'set-all-ones' bit here. While this CURRENTLY works, I fear the effect this coy-implementation will have on any changes to that. Also, using the `sizeof` the `id` to try to figure out the `SmallVector` optimization size feels wrong too.
https://github.com/llvm/llvm-project/pull/141776
More information about the libcxx-commits
mailing list