From: JF Bastien Date: Thu, 7 Apr 2016 15:50:05 +0000 (+0000) Subject: NFC: disallow comparison of AtomicOrdering X-Git-Tag: llvmorg-3.9.0-rc1~9728 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1951092ff6a40b0c602396d9d357e9fbe464b5f;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h index 4fd5cad..df3bb71 100644 --- a/llvm/include/llvm/IR/Instructions.h +++ b/llvm/include/llvm/IR/Instructions.h @@ -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",