NFC: disallow comparison of AtomicOrdering

Follow-up to D18775 and related clang change. AtomicOrdering is a lattice, 'stronger' is the right thing to do, direct comparison is fraught with peril.

llvm-svn: 265685
This commit is contained in:
JF Bastien 2016-04-07 15:50:05 +00:00
parent 6e6966460a
commit e1951092ff
1 changed files with 5 additions and 0 deletions

View File

@ -53,6 +53,11 @@ enum class AtomicOrdering {
SequentiallyConsistent = 7
};
bool operator<(AtomicOrdering, AtomicOrdering) = delete;
bool operator>(AtomicOrdering, AtomicOrdering) = delete;
bool operator<=(AtomicOrdering, AtomicOrdering) = delete;
bool operator>=(AtomicOrdering, AtomicOrdering) = delete;
/// String used by LLVM IR to represent atomic ordering.
static inline const char *toIRString(AtomicOrdering ao) {
static const char *names[8] = {"not_atomic", "unordered", "monotonic",