[PATCH] D18775: NFC: make AtomicOrdering an enum class

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 15:03:58 PDT 2016


dberlin added a subscriber: dberlin.
dberlin added a comment.

This breaks the ability to hash them :)

IE, i have a hash function that does:
return hash_combine(A->getType(), A->getPointerOperand()->getType(),

  A->getValueOperand()->getType(), A->isVolatile(),
  A->getAlignment(), A->getOrdering(),
  A->getSynchScope());

now the hash on getOrdering fails with wonderful template messages.

Can you define hash_value for it (see ADT/Hashing.h)?

(The hash works on getSynchScope because it's not an enum class, just an
enum)


Repository:
  rL LLVM

http://reviews.llvm.org/D18775





More information about the llvm-commits mailing list