================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits