Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit fb9ead0

Browse files
committed
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265685 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent d04d5a9 commit fb9ead0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/llvm/IR/Instructions.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ enum class AtomicOrdering {
5353
SequentiallyConsistent = 7
5454
};
5555

56+
bool operator<(AtomicOrdering, AtomicOrdering) = delete;
57+
bool operator>(AtomicOrdering, AtomicOrdering) = delete;
58+
bool operator<=(AtomicOrdering, AtomicOrdering) = delete;
59+
bool operator>=(AtomicOrdering, AtomicOrdering) = delete;
60+
5661
/// String used by LLVM IR to represent atomic ordering.
5762
static inline const char *toIRString(AtomicOrdering ao) {
5863
static const char *names[8] = {"not_atomic", "unordered", "monotonic",

0 commit comments

Comments
 (0)