[llvm] DenseMap: support enum class keys (PR #95972)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 12:26:01 PDT 2024


nikic wrote:

> > Though I would like to hear where you plan to use this. Usually enums imply that there is a reasonably small, continuously numbered and fixed set of keys, in which case using a vector instead of map is often preferable.
> 
> This is a requirement for my new Presburger parser, which keeps a map of `{DimOrSymbol, position} -> multiplier`. The parser isn't ready just yet, but will be soon'ish.

Ah, so this is mostly a building block for hashing std::pair? That makes sense.

https://github.com/llvm/llvm-project/pull/95972


More information about the llvm-commits mailing list