diff --git a/include/llvm/Support/AtomicOrdering.h b/include/llvm/Support/AtomicOrdering.h index a8d89955fa2..27ca825cef4 100644 --- a/include/llvm/Support/AtomicOrdering.h +++ b/include/llvm/Support/AtomicOrdering.h @@ -21,7 +21,7 @@ namespace llvm { -/// Atomic ordering for C11 / C++11's memody models. +/// Atomic ordering for C11 / C++11's memory models. /// /// These values cannot change because they are shared with standard library /// implementations as well as with other compilers. @@ -87,7 +87,7 @@ inline const char *toIRString(AtomicOrdering ao) { /// Returns true if ao is stronger than other as defined by the AtomicOrdering /// lattice, which is based on C++'s definition. -inline bool isStrongerThan(AtomicOrdering ao, AtomicOrdering other) { +inline bool isStrongerThan(AtomicOrdering AO, AtomicOrdering Other) { static const bool lookup[8][8] = { // NA UN RX CO AC RE AR SC /* NotAtomic */ {false, false, false, false, false, false, false, false}, @@ -99,10 +99,10 @@ inline bool isStrongerThan(AtomicOrdering ao, AtomicOrdering other) { /* acq_rel */ { true, true, true, true, true, true, false, false}, /* seq_cst */ { true, true, true, true, true, true, true, false}, }; - return lookup[static_cast(ao)][static_cast(other)]; + return lookup[static_cast(AO)][static_cast(Other)]; } -inline bool isAtLeastOrStrongerThan(AtomicOrdering ao, AtomicOrdering other) { +inline bool isAtLeastOrStrongerThan(AtomicOrdering AO, AtomicOrdering Other) { static const bool lookup[8][8] = { // NA UN RX CO AC RE AR SC /* NotAtomic */ { true, false, false, false, false, false, false, false}, @@ -114,26 +114,26 @@ inline bool isAtLeastOrStrongerThan(AtomicOrdering ao, AtomicOrdering other) { /* acq_rel */ { true, true, true, true, true, true, true, false}, /* seq_cst */ { true, true, true, true, true, true, true, true}, }; - return lookup[static_cast(ao)][static_cast(other)]; + return lookup[static_cast(AO)][static_cast(Other)]; } -inline bool isStrongerThanUnordered(AtomicOrdering ao) { - return isStrongerThan(ao, AtomicOrdering::Unordered); +inline bool isStrongerThanUnordered(AtomicOrdering AO) { + return isStrongerThan(AO, AtomicOrdering::Unordered); } -inline bool isStrongerThanMonotonic(AtomicOrdering ao) { - return isStrongerThan(ao, AtomicOrdering::Monotonic); +inline bool isStrongerThanMonotonic(AtomicOrdering AO) { + return isStrongerThan(AO, AtomicOrdering::Monotonic); } -inline bool isAcquireOrStronger(AtomicOrdering ao) { - return isAtLeastOrStrongerThan(ao, AtomicOrdering::Acquire); +inline bool isAcquireOrStronger(AtomicOrdering AO) { + return isAtLeastOrStrongerThan(AO, AtomicOrdering::Acquire); } -inline bool isReleaseOrStronger(AtomicOrdering ao) { - return isAtLeastOrStrongerThan(ao, AtomicOrdering::Release); +inline bool isReleaseOrStronger(AtomicOrdering AO) { + return isAtLeastOrStrongerThan(AO, AtomicOrdering::Release); } -inline AtomicOrderingCABI toCABI(AtomicOrdering ao) { +inline AtomicOrderingCABI toCABI(AtomicOrdering AO) { static const AtomicOrderingCABI lookup[8] = { /* NotAtomic */ AtomicOrderingCABI::relaxed, /* Unordered */ AtomicOrderingCABI::relaxed, @@ -144,7 +144,7 @@ inline AtomicOrderingCABI toCABI(AtomicOrdering ao) { /* acq_rel */ AtomicOrderingCABI::acq_rel, /* seq_cst */ AtomicOrderingCABI::seq_cst, }; - return lookup[static_cast(ao)]; + return lookup[static_cast(AO)]; } } // end namespace llvm