[llvm] cb2a8be - [ADT] NFC: Fix typos in header comments
Jean-Michel Gorius via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 08:43:50 PDT 2020
Author: Jean-Michel Gorius
Date: 2020-05-21T17:43:00+02:00
New Revision: cb2a8be8842a39ed9b657fa9928733f8d70079f0
URL: https://github.com/llvm/llvm-project/commit/cb2a8be8842a39ed9b657fa9928733f8d70079f0
DIFF: https://github.com/llvm/llvm-project/commit/cb2a8be8842a39ed9b657fa9928733f8d70079f0.diff
LOG: [ADT] NFC: Fix typos in header comments
Added:
Modified:
llvm/include/llvm/ADT/APFloat.h
llvm/include/llvm/ADT/DAGDeltaAlgorithm.h
llvm/include/llvm/ADT/DeltaAlgorithm.h
llvm/include/llvm/ADT/DenseMap.h
llvm/include/llvm/ADT/FloatingPointMode.h
llvm/include/llvm/ADT/FoldingSet.h
llvm/include/llvm/ADT/ImmutableSet.h
llvm/include/llvm/ADT/IntervalMap.h
llvm/include/llvm/ADT/PointerSumType.h
llvm/include/llvm/ADT/PointerUnion.h
llvm/include/llvm/ADT/SmallPtrSet.h
llvm/include/llvm/ADT/SmallVector.h
llvm/include/llvm/ADT/SparseSet.h
llvm/include/llvm/ADT/Waymarking.h
llvm/include/llvm/ADT/fallible_iterator.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h
index 44857f777502..876e52c150a0 100644
--- a/llvm/include/llvm/ADT/APFloat.h
+++ b/llvm/include/llvm/ADT/APFloat.h
@@ -593,7 +593,7 @@ IEEEFloat scalbn(IEEEFloat X, int Exp, IEEEFloat::roundingMode);
IEEEFloat frexp(const IEEEFloat &Val, int &Exp, IEEEFloat::roundingMode RM);
// This mode implements more precise float in terms of two APFloats.
-// The interface and layout is designed for arbitray underlying semantics,
+// The interface and layout is designed for arbitrary underlying semantics,
// though currently only PPCDoubleDouble semantics are supported, whose
// corresponding underlying semantics are IEEEdouble.
class DoubleAPFloat final : public APFloatBase {
diff --git a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h b/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h
index d4cdc3c86048..c3872af2a0b4 100644
--- a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h
+++ b/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h
@@ -29,7 +29,7 @@ namespace llvm {
///
/// P(S) => P(S union pred(S))
///
-/// The minization algorithm uses this dependency information to attempt to
+/// The minimization algorithm uses this dependency information to attempt to
/// eagerly prune large subsets of changes. As with \see DeltaAlgorithm, the DAG
/// is not required to satisfy this property, but the algorithm will run
/// substantially fewer tests with appropriate dependencies. \see DeltaAlgorithm
diff --git a/llvm/include/llvm/ADT/DeltaAlgorithm.h b/llvm/include/llvm/ADT/DeltaAlgorithm.h
index 114b95499530..e1743fd00196 100644
--- a/llvm/include/llvm/ADT/DeltaAlgorithm.h
+++ b/llvm/include/llvm/ADT/DeltaAlgorithm.h
@@ -54,7 +54,7 @@ class DeltaAlgorithm {
/// Split - Partition a set of changes \p S into one or two subsets.
void Split(const changeset_ty &S, changesetlist_ty &Res);
- /// Delta - Minimize a set of \p Changes which has been partioned into
+ /// Delta - Minimize a set of \p Changes which has been partitioned into
/// smaller sets, by attempting to remove individual subsets.
changeset_ty Delta(const changeset_ty &Changes,
const changesetlist_ty &Sets);
diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h
index 2a6f67c7fa21..34d397cc9793 100644
--- a/llvm/include/llvm/ADT/DenseMap.h
+++ b/llvm/include/llvm/ADT/DenseMap.h
@@ -725,7 +725,7 @@ class DenseMap : public DenseMapBase<DenseMap<KeyT, ValueT, KeyInfoT, BucketT>,
unsigned NumBuckets;
public:
- /// Create a DenseMap wth an optional \p InitialReserve that guarantee that
+ /// Create a DenseMap with an optional \p InitialReserve that guarantee that
/// this number of elements can be inserted in the map without grow()
explicit DenseMap(unsigned InitialReserve = 0) { init(InitialReserve); }
diff --git a/llvm/include/llvm/ADT/FloatingPointMode.h b/llvm/include/llvm/ADT/FloatingPointMode.h
index c8c83d8be8d6..3ba8ae1b2855 100644
--- a/llvm/include/llvm/ADT/FloatingPointMode.h
+++ b/llvm/include/llvm/ADT/FloatingPointMode.h
@@ -44,7 +44,7 @@ enum class RoundingMode : int8_t {
Invalid = -1 ///< Denotes invalid value.
};
-/// Represent ssubnormal handling kind for floating point instruction inputs and
+/// Represent subnormal handling kind for floating point instruction inputs and
/// outputs.
struct DenormalMode {
/// Represent handled modes for denormal (aka subnormal) modes in the floating
diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h
index 97dacc86459d..fb1cb03a4b5c 100644
--- a/llvm/include/llvm/ADT/FoldingSet.h
+++ b/llvm/include/llvm/ADT/FoldingSet.h
@@ -494,7 +494,7 @@ class FoldingSet : public FoldingSetImpl<FoldingSet<T>, T> {
using Super = FoldingSetImpl<FoldingSet, T>;
using Node = typename Super::Node;
- /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a
+ /// GetNodeProfile - Each instantiation of the FoldingSet needs to provide a
/// way to convert nodes into a unique specifier.
static void GetNodeProfile(const FoldingSetBase *, Node *N,
FoldingSetNodeID &ID) {
diff --git a/llvm/include/llvm/ADT/ImmutableSet.h b/llvm/include/llvm/ADT/ImmutableSet.h
index a6a6abfd9600..bab98f4b187a 100644
--- a/llvm/include/llvm/ADT/ImmutableSet.h
+++ b/llvm/include/llvm/ADT/ImmutableSet.h
@@ -169,7 +169,7 @@ class ImutAVLTree {
bool contains(key_type_ref K) { return (bool) find(K); }
/// foreach - A member template the accepts invokes operator() on a functor
- /// object (specifed by Callback) for every node/subtree in the tree.
+ /// object (specified by Callback) for every node/subtree in the tree.
/// Nodes are visited using an inorder traversal.
template <typename Callback>
void foreach(Callback& C) {
@@ -183,7 +183,7 @@ class ImutAVLTree {
}
/// validateTree - A utility method that checks that the balancing and
- /// ordering invariants of the tree are satisifed. It is a recursive
+ /// ordering invariants of the tree are satisfied. It is a recursive
/// method that returns the height of the tree, which is then consumed
/// by the enclosing validateTree call. External callers should ignore the
/// return value. An invalid tree will cause an assertion to fire in
@@ -450,7 +450,7 @@ class ImutAVLFactory {
//===--------------------------------------------------===//
// "createNode" is used to generate new tree roots that link
- // to other trees. The functon may also simply move links
+ // to other trees. The function may also simply move links
// in an existing root if that root is still marked mutable.
// This is necessary because otherwise our balancing code
// would leak memory as it would create nodes that are
diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h
index e9e6c54563f9..db7804d0a551 100644
--- a/llvm/include/llvm/ADT/IntervalMap.h
+++ b/llvm/include/llvm/ADT/IntervalMap.h
@@ -823,7 +823,7 @@ class Path {
}
/// reset - Reset cached information about node(Level) from subtree(Level -1).
- /// @param Level 1..height. THe node to update after parent node changed.
+ /// @param Level 1..height. The node to update after parent node changed.
void reset(unsigned Level) {
path[Level] = Entry(subtree(Level - 1), offset(Level));
}
@@ -884,7 +884,7 @@ class Path {
}
/// getLeftSibling - Get the left sibling node at Level, or a null NodeRef.
- /// @param Level Get the sinbling to node(Level).
+ /// @param Level Get the sibling to node(Level).
/// @return Left sibling, or NodeRef().
NodeRef getRightSibling(unsigned Level) const;
@@ -1396,7 +1396,7 @@ class IntervalMap<KeyT, ValT, N, Traits>::const_iterator :
setRoot(map->rootSize);
}
- /// preincrement - move to the next interval.
+ /// preincrement - Move to the next interval.
const_iterator &operator++() {
assert(valid() && "Cannot increment end()");
if (++path.leafOffset() == path.leafSize() && branched())
@@ -1404,14 +1404,14 @@ class IntervalMap<KeyT, ValT, N, Traits>::const_iterator :
return *this;
}
- /// postincrement - Dont do that!
+ /// postincrement - Don't do that!
const_iterator operator++(int) {
const_iterator tmp = *this;
operator++();
return tmp;
}
- /// predecrement - move to the previous interval.
+ /// predecrement - Move to the previous interval.
const_iterator &operator--() {
if (path.leafOffset() && (valid() || !branched()))
--path.leafOffset();
@@ -1420,7 +1420,7 @@ class IntervalMap<KeyT, ValT, N, Traits>::const_iterator :
return *this;
}
- /// postdecrement - Dont do that!
+ /// postdecrement - Don't do that!
const_iterator operator--(int) {
const_iterator tmp = *this;
operator--();
diff --git a/llvm/include/llvm/ADT/PointerSumType.h b/llvm/include/llvm/ADT/PointerSumType.h
index d467f83f58ac..a7ef774e205e 100644
--- a/llvm/include/llvm/ADT/PointerSumType.h
+++ b/llvm/include/llvm/ADT/PointerSumType.h
@@ -214,7 +214,7 @@ struct PointerSumTypeHelper : MemberTs... {
LookupOverload(PointerSumTypeMember<N, PointerT, TraitsT> *);
template <TagT N> static void LookupOverload(...);
template <TagT N> struct Lookup {
- // Compute a particular member type by resolving the lookup helper ovorload.
+ // Compute a particular member type by resolving the lookup helper overload.
using MemberT = decltype(
LookupOverload<N>(static_cast<PointerSumTypeHelper *>(nullptr)));
diff --git a/llvm/include/llvm/ADT/PointerUnion.h b/llvm/include/llvm/ADT/PointerUnion.h
index 8a5ecfce5a30..6fecff8d756f 100644
--- a/llvm/include/llvm/ADT/PointerUnion.h
+++ b/llvm/include/llvm/ADT/PointerUnion.h
@@ -197,7 +197,7 @@ class PointerUnion
}
/// Returns the current pointer if it is of the specified pointer type,
- /// otherwises returns null.
+ /// otherwise returns null.
template <typename T> T dyn_cast() const {
if (is<T>())
return get<T>();
diff --git a/llvm/include/llvm/ADT/SmallPtrSet.h b/llvm/include/llvm/ADT/SmallPtrSet.h
index 113701ffd1e1..05073cf17f92 100644
--- a/llvm/include/llvm/ADT/SmallPtrSet.h
+++ b/llvm/include/llvm/ADT/SmallPtrSet.h
@@ -278,7 +278,7 @@ class SmallPtrSetIterator : public SmallPtrSetIteratorImpl,
const DebugEpochBase &Epoch)
: SmallPtrSetIteratorImpl(BP, E), DebugEpochBase::HandleBase(&Epoch) {}
- // Most methods provided by baseclass.
+ // Most methods are provided by the base class.
const PtrTy operator*() const {
assert(isHandleInSync() && "invalid iterator access!");
diff --git a/llvm/include/llvm/ADT/SmallVector.h b/llvm/include/llvm/ADT/SmallVector.h
index 6313fc563bea..3ccee3d21d48 100644
--- a/llvm/include/llvm/ADT/SmallVector.h
+++ b/llvm/include/llvm/ADT/SmallVector.h
@@ -39,7 +39,7 @@ namespace llvm {
///
/// The template parameter specifies the type which should be used to hold the
/// Size and Capacity of the SmallVector, so it can be adjusted.
-/// Using 32 bit size is desirable to shink the size of the SmallVector.
+/// Using 32 bit size is desirable to shrink the size of the SmallVector.
/// Using 64 bit size is desirable for cases like SmallVector<char>, where a
/// 32 bit size would limit the vector to ~4GB. SmallVectors are used for
/// buffering bitcode output - which can exceed 4GB.
diff --git a/llvm/include/llvm/ADT/SparseSet.h b/llvm/include/llvm/ADT/SparseSet.h
index 35e9e0cb405b..74457d5fd679 100644
--- a/llvm/include/llvm/ADT/SparseSet.h
+++ b/llvm/include/llvm/ADT/SparseSet.h
@@ -79,7 +79,7 @@ struct SparseSetValFunctor<KeyT, KeyT, KeyFunctorT> {
}
};
-/// SparseSet - Fast set implmentation for objects that can be identified by
+/// SparseSet - Fast set implementation for objects that can be identified by
/// small unsigned keys.
///
/// SparseSet allocates memory proportional to the size of the key universe, so
diff --git a/llvm/include/llvm/ADT/Waymarking.h b/llvm/include/llvm/ADT/Waymarking.h
index 547538c75f14..f00bc106938f 100644
--- a/llvm/include/llvm/ADT/Waymarking.h
+++ b/llvm/include/llvm/ADT/Waymarking.h
@@ -127,7 +127,7 @@ template <unsigned NumBits> struct WaymarkingTraits {
MARK_MASK = (STOP_MASK - 1),
TAG_MASK = (MARK_MASK | STOP_MASK),
- // The number of pre-calculated tags (for fast fill).
+ // The number of pre-computed tags (for fast fill).
NUM_STATIC_TAGS = 32
};
@@ -169,7 +169,7 @@ template <unsigned NumBits> struct WaymarkingTraits {
// in Values.
static const unsigned Remain = Count;
- // The array of ordered pre-calculated Tags.
+ // The array of ordered pre-computed Tags.
static const uint8_t Values[sizeof...(Vals)];
};
@@ -241,7 +241,7 @@ void fillWaymarks(TIter Begin, TIter End, size_t Offset = 0) {
return;
}
} else {
- // The given offset is larger than the number of pre-calculated tags, so we
+ // The given offset is larger than the number of pre-computed tags, so we
// must do it the hard way.
// Calculate the next remaining Count, as if we have filled the tags up to
// the given offset.
diff --git a/llvm/include/llvm/ADT/fallible_iterator.h b/llvm/include/llvm/ADT/fallible_iterator.h
index 62396ddfe8ad..a196d8866b51 100644
--- a/llvm/include/llvm/ADT/fallible_iterator.h
+++ b/llvm/include/llvm/ADT/fallible_iterator.h
@@ -86,7 +86,7 @@ template <typename Underlying> class fallible_iterator {
return fallible_iterator(std::move(I), &Err);
}
- /// Construct a fallible iteratro that can be used as an end-of-range value.
+ /// Construct a fallible iterator that can be used as an end-of-range value.
///
/// A value created by this method can be dereferenced (if the underlying
/// value points at a valid value) and compared, but not incremented or
More information about the llvm-commits
mailing list