[llvm] 49a944a - [NFC] Fix typo and variable names
Aditya Kumar via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 15 09:06:36 PDT 2020
Author: Aditya Kumar
Date: 2020-08-15T09:06:22-07:00
New Revision: 49a944af7f1980b54d8a2be0ef640f5a956bc423
URL: https://github.com/llvm/llvm-project/commit/49a944af7f1980b54d8a2be0ef640f5a956bc423
DIFF: https://github.com/llvm/llvm-project/commit/49a944af7f1980b54d8a2be0ef640f5a956bc423.diff
LOG: [NFC] Fix typo and variable names
Added:
Modified:
llvm/include/llvm/Support/AtomicOrdering.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/AtomicOrdering.h b/llvm/include/llvm/Support/AtomicOrdering.h
index a8d89955fa2b..27ca825cef46 100644
--- a/llvm/include/llvm/Support/AtomicOrdering.h
+++ b/llvm/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<size_t>(ao)][static_cast<size_t>(other)];
+ return lookup[static_cast<size_t>(AO)][static_cast<size_t>(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<size_t>(ao)][static_cast<size_t>(other)];
+ return lookup[static_cast<size_t>(AO)][static_cast<size_t>(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<size_t>(ao)];
+ return lookup[static_cast<size_t>(AO)];
}
} // end namespace llvm
More information about the llvm-commits
mailing list