[llvm] [llvm] annotate interfaces in llvm/ADT for DLL export (PR #136629)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 15:51:02 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h -- llvm/include/llvm/ADT/APFixedPoint.h llvm/include/llvm/ADT/APFloat.h llvm/include/llvm/ADT/APInt.h llvm/include/llvm/ADT/APSInt.h llvm/include/llvm/ADT/DAGDeltaAlgorithm.h llvm/include/llvm/ADT/DeltaAlgorithm.h llvm/include/llvm/ADT/DeltaTree.h llvm/include/llvm/ADT/DynamicAPInt.h llvm/include/llvm/ADT/FloatingPointMode.h llvm/include/llvm/ADT/FoldingSet.h llvm/include/llvm/ADT/IntEqClasses.h llvm/include/llvm/ADT/IntervalMap.h llvm/include/llvm/ADT/RewriteBuffer.h llvm/include/llvm/ADT/RewriteRope.h llvm/include/llvm/ADT/SlowDynamicAPInt.h llvm/include/llvm/ADT/SmallPtrSet.h llvm/include/llvm/ADT/SmallVector.h llvm/include/llvm/ADT/Statistic.h llvm/include/llvm/ADT/StringExtras.h llvm/include/llvm/ADT/StringMap.h llvm/include/llvm/ADT/StringRef.h llvm/include/llvm/ADT/TrieRawHashMap.h llvm/include/llvm/ADT/Twine.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/ADT/APFixedPoint.h b/llvm/include/llvm/ADT/APFixedPoint.h
index cbb5f1750..658e7ff9c 100644
--- a/llvm/include/llvm/ADT/APFixedPoint.h
+++ b/llvm/include/llvm/ADT/APFixedPoint.h
@@ -89,7 +89,7 @@ public:
   getCommonSemantics(const FixedPointSemantics &Other) const;
 
   /// Print semantics for debug purposes
-  LLVM_ABI void print(llvm::raw_ostream& OS) const;
+  LLVM_ABI void print(llvm::raw_ostream &OS) const;
 
   /// Returns true if this fixed-point semantic with its value bits interpreted
   /// as an integer can fit in the given floating point semantic without
@@ -192,16 +192,20 @@ public:
   // parameter is provided, set this value to true or false to indicate if this
   // operation results in an overflow.
   LLVM_ABI APFixedPoint convert(const FixedPointSemantics &DstSema,
-                       bool *Overflow = nullptr) const;
+                                bool *Overflow = nullptr) const;
 
   // Perform binary operations on a fixed point type. The resulting fixed point
   // value will be in the common, full precision semantics that can represent
   // the precision and ranges of both input values. See convert() for an
   // explanation of the Overflow parameter.
-  LLVM_ABI APFixedPoint add(const APFixedPoint &Other, bool *Overflow = nullptr) const;
-  LLVM_ABI APFixedPoint sub(const APFixedPoint &Other, bool *Overflow = nullptr) const;
-  LLVM_ABI APFixedPoint mul(const APFixedPoint &Other, bool *Overflow = nullptr) const;
-  LLVM_ABI APFixedPoint div(const APFixedPoint &Other, bool *Overflow = nullptr) const;
+  LLVM_ABI APFixedPoint add(const APFixedPoint &Other,
+                            bool *Overflow = nullptr) const;
+  LLVM_ABI APFixedPoint sub(const APFixedPoint &Other,
+                            bool *Overflow = nullptr) const;
+  LLVM_ABI APFixedPoint mul(const APFixedPoint &Other,
+                            bool *Overflow = nullptr) const;
+  LLVM_ABI APFixedPoint div(const APFixedPoint &Other,
+                            bool *Overflow = nullptr) const;
 
   // Perform shift operations on a fixed point type. Unlike the other binary
   // operations, the resulting fixed point value will be in the original
@@ -236,7 +240,7 @@ public:
   /// to be fully stored in the provided width and sign, the overflow parameter
   /// is set to true.
   LLVM_ABI APSInt convertToInt(unsigned DstWidth, bool DstSign,
-                      bool *Overflow = nullptr) const;
+                               bool *Overflow = nullptr) const;
 
   /// Convert this fixed point number to a floating point value with the
   /// provided semantics.
@@ -275,15 +279,16 @@ public:
 
   /// Given a floating point semantic, return the next floating point semantic
   /// with a larger exponent and larger or equal mantissa.
-  LLVM_ABI static const fltSemantics *promoteFloatSemantics(const fltSemantics *S);
+  LLVM_ABI static const fltSemantics *
+  promoteFloatSemantics(const fltSemantics *S);
 
   /// Create an APFixedPoint with a value equal to that of the provided integer,
   /// and in the same semantics as the provided target semantics. If the value
   /// is not able to fit in the specified fixed point semantics, and the
   /// overflow parameter is provided, it is set to true.
-  LLVM_ABI static APFixedPoint getFromIntValue(const APSInt &Value,
-                                      const FixedPointSemantics &DstFXSema,
-                                      bool *Overflow = nullptr);
+  LLVM_ABI static APFixedPoint
+  getFromIntValue(const APSInt &Value, const FixedPointSemantics &DstFXSema,
+                  bool *Overflow = nullptr);
 
   /// Create an APFixedPoint with a value equal to that of the provided
   /// floating point value, in the provided target semantics. If the value is
@@ -292,9 +297,9 @@ public:
   /// For NaN, the Overflow flag is always set. For +inf and -inf, if the
   /// semantic is saturating, the value saturates. Otherwise, the Overflow flag
   /// is set.
-  LLVM_ABI static APFixedPoint getFromFloatValue(const APFloat &Value,
-                                        const FixedPointSemantics &DstFXSema,
-                                        bool *Overflow = nullptr);
+  LLVM_ABI static APFixedPoint
+  getFromFloatValue(const APFloat &Value, const FixedPointSemantics &DstFXSema,
+                    bool *Overflow = nullptr);
 
 private:
   APSInt Val;
diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h
index 549374979..909bb802f 100644
--- a/llvm/include/llvm/ADT/APFloat.h
+++ b/llvm/include/llvm/ADT/APFloat.h
@@ -285,7 +285,8 @@ struct APFloatBase {
   // Returns true if any number described by this semantics can be precisely
   // represented by the specified semantics. Does not take into account
   // the value of fltNonfiniteBehavior, hasZero, hasSignedRepr.
-  LLVM_ABI static bool isRepresentableBy(const fltSemantics &A, const fltSemantics &B);
+  LLVM_ABI static bool isRepresentableBy(const fltSemantics &A,
+                                         const fltSemantics &B);
 
   /// @}
 
@@ -349,7 +350,8 @@ struct APFloatBase {
   LLVM_ABI static ExponentType semanticsMinExponent(const fltSemantics &);
   LLVM_ABI static ExponentType semanticsMaxExponent(const fltSemantics &);
   LLVM_ABI static unsigned int semanticsSizeInBits(const fltSemantics &);
-  LLVM_ABI static unsigned int semanticsIntSizeInBits(const fltSemantics&, bool);
+  LLVM_ABI static unsigned int semanticsIntSizeInBits(const fltSemantics &,
+                                                      bool);
   LLVM_ABI static bool semanticsHasZero(const fltSemantics &);
   LLVM_ABI static bool semanticsHasSignedRepr(const fltSemantics &);
   LLVM_ABI static bool semanticsHasInf(const fltSemantics &);
@@ -360,7 +362,7 @@ struct APFloatBase {
   // Returns true if any number described by \p Src can be precisely represented
   // by a normal (not subnormal) value in \p Dst.
   LLVM_ABI static bool isRepresentableAsNormalIn(const fltSemantics &Src,
-                                        const fltSemantics &Dst);
+                                                 const fltSemantics &Dst);
 
   /// Returns the size of the floating point number (in bits) in the given
   /// semantics.
@@ -436,7 +438,8 @@ public:
   LLVM_ABI opStatus remainder(const IEEEFloat &);
   /// C fmod, or llvm frem.
   LLVM_ABI opStatus mod(const IEEEFloat &);
-  LLVM_ABI opStatus fusedMultiplyAdd(const IEEEFloat &, const IEEEFloat &, roundingMode);
+  LLVM_ABI opStatus fusedMultiplyAdd(const IEEEFloat &, const IEEEFloat &,
+                                     roundingMode);
   LLVM_ABI opStatus roundToIntegral(roundingMode);
   /// IEEE-754R 5.3.1: nextUp/nextDown.
   LLVM_ABI opStatus next(bool nextDown);
@@ -454,13 +457,15 @@ public:
   /// @{
 
   LLVM_ABI opStatus convert(const fltSemantics &, roundingMode, bool *);
-  LLVM_ABI opStatus convertToInteger(MutableArrayRef<integerPart>, unsigned int, bool,
-                            roundingMode, bool *) const;
+  LLVM_ABI opStatus convertToInteger(MutableArrayRef<integerPart>, unsigned int,
+                                     bool, roundingMode, bool *) const;
   LLVM_ABI opStatus convertFromAPInt(const APInt &, bool, roundingMode);
-  LLVM_ABI opStatus convertFromSignExtendedInteger(const integerPart *, unsigned int,
-                                          bool, roundingMode);
-  LLVM_ABI opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int,
-                                          bool, roundingMode);
+  LLVM_ABI opStatus convertFromSignExtendedInteger(const integerPart *,
+                                                   unsigned int, bool,
+                                                   roundingMode);
+  LLVM_ABI opStatus convertFromZeroExtendedInteger(const integerPart *,
+                                                   unsigned int, bool,
+                                                   roundingMode);
   LLVM_ABI Expected<opStatus> convertFromString(StringRef, roundingMode);
   LLVM_ABI APInt bitcastToAPInt() const;
   LLVM_ABI double convertToDouble() const;
@@ -487,7 +492,7 @@ public:
   /// which must be of sufficient size, in the C99 form [-]0xh.hhhhp[+-]d.
   /// Return the number of characters written, excluding the terminating NUL.
   LLVM_ABI unsigned int convertToHexString(char *dst, unsigned int hexDigits,
-                                  bool upperCase, roundingMode) const;
+                                           bool upperCase, roundingMode) const;
 
   /// \name IEEE-754R 5.7.2 General operations.
   /// @{
@@ -595,8 +600,10 @@ public:
   /// 1.01E-2              5             2       0.0101
   /// 1.01E-2              4             2       0.0101
   /// 1.01E-2              4             1       1.01E-2
-  LLVM_ABI void toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision = 0,
-                unsigned FormatMaxPadding = 3, bool TruncateZero = true) const;
+  LLVM_ABI void toString(SmallVectorImpl<char> &Str,
+                         unsigned FormatPrecision = 0,
+                         unsigned FormatMaxPadding = 3,
+                         bool TruncateZero = true) const;
 
   /// If this value has an exact multiplicative inverse, store it in inv and
   /// return true.
@@ -604,8 +611,7 @@ public:
 
   // If this is an exact power of two, return the exponent while ignoring the
   // sign bit. If it's not an exact power of 2, return INT_MIN
-  LLVM_ABI LLVM_READONLY
-  int getExactLog2Abs() const;
+  LLVM_ABI LLVM_READONLY int getExactLog2Abs() const;
 
   // If this is an exact power of two, return the exponent. If it's not an exact
   // power of 2, return INT_MIN
@@ -636,7 +642,7 @@ public:
   LLVM_ABI void makeLargest(bool Neg = false);
   LLVM_ABI void makeSmallest(bool Neg = false);
   LLVM_ABI void makeNaN(bool SNaN = false, bool Neg = false,
-               const APInt *fill = nullptr);
+                        const APInt *fill = nullptr);
   LLVM_ABI void makeInf(bool Neg = false);
   LLVM_ABI void makeZero(bool Neg = false);
   LLVM_ABI void makeQuiet();
@@ -666,10 +672,11 @@ private:
 
   LLVM_ABI integerPart addSignificand(const IEEEFloat &);
   LLVM_ABI integerPart subtractSignificand(const IEEEFloat &, integerPart);
-  LLVM_ABI lostFraction addOrSubtractSignificand(const IEEEFloat &, bool subtract);
+  LLVM_ABI lostFraction addOrSubtractSignificand(const IEEEFloat &,
+                                                 bool subtract);
   LLVM_ABI lostFraction multiplySignificand(const IEEEFloat &, IEEEFloat,
-                                   bool ignoreAddend = false);
-  LLVM_ABI lostFraction multiplySignificand(const IEEEFloat&);
+                                            bool ignoreAddend = false);
+  LLVM_ABI lostFraction multiplySignificand(const IEEEFloat &);
   LLVM_ABI lostFraction divideSignificand(const IEEEFloat &);
   LLVM_ABI void incrementSignificand();
   LLVM_ABI void initialize(const fltSemantics *);
@@ -695,7 +702,7 @@ private:
   LLVM_ABI opStatus divideSpecials(const IEEEFloat &);
   LLVM_ABI opStatus multiplySpecials(const IEEEFloat &);
   LLVM_ABI opStatus modSpecials(const IEEEFloat &);
-  LLVM_ABI opStatus remainderSpecials(const IEEEFloat&);
+  LLVM_ABI opStatus remainderSpecials(const IEEEFloat &);
 
   /// @}
 
@@ -704,20 +711,24 @@ private:
 
   LLVM_ABI bool convertFromStringSpecials(StringRef str);
   LLVM_ABI opStatus normalize(roundingMode, lostFraction);
-  LLVM_ABI opStatus addOrSubtract(const IEEEFloat &, roundingMode, bool subtract);
+  LLVM_ABI opStatus addOrSubtract(const IEEEFloat &, roundingMode,
+                                  bool subtract);
   LLVM_ABI opStatus handleOverflow(roundingMode);
-  LLVM_ABI bool roundAwayFromZero(roundingMode, lostFraction, unsigned int) const;
+  LLVM_ABI bool roundAwayFromZero(roundingMode, lostFraction,
+                                  unsigned int) const;
   LLVM_ABI opStatus convertToSignExtendedInteger(MutableArrayRef<integerPart>,
-                                        unsigned int, bool, roundingMode,
-                                        bool *) const;
+                                                 unsigned int, bool,
+                                                 roundingMode, bool *) const;
   LLVM_ABI opStatus convertFromUnsignedParts(const integerPart *, unsigned int,
-                                    roundingMode);
-  LLVM_ABI Expected<opStatus> convertFromHexadecimalString(StringRef, roundingMode);
+                                             roundingMode);
+  LLVM_ABI Expected<opStatus> convertFromHexadecimalString(StringRef,
+                                                           roundingMode);
   LLVM_ABI Expected<opStatus> convertFromDecimalString(StringRef, roundingMode);
   LLVM_ABI char *convertNormalToHexString(char *, unsigned int, bool,
-                                 roundingMode) const;
-  LLVM_ABI opStatus roundSignificandWithExponent(const integerPart *, unsigned int, int,
-                                        roundingMode);
+                                          roundingMode) const;
+  LLVM_ABI opStatus roundSignificandWithExponent(const integerPart *,
+                                                 unsigned int, int,
+                                                 roundingMode);
   LLVM_ABI ExponentType exponentNaN() const;
   LLVM_ABI ExponentType exponentInf() const;
   LLVM_ABI ExponentType exponentZero() const;
@@ -811,18 +822,21 @@ class DoubleAPFloat final {
   const fltSemantics *Semantics;
   APFloat *Floats;
 
-  LLVM_ABI opStatus addImpl(const APFloat &a, const APFloat &aa, const APFloat &c,
-                   const APFloat &cc, roundingMode RM);
+  LLVM_ABI opStatus addImpl(const APFloat &a, const APFloat &aa,
+                            const APFloat &c, const APFloat &cc,
+                            roundingMode RM);
 
-  LLVM_ABI opStatus addWithSpecial(const DoubleAPFloat &LHS, const DoubleAPFloat &RHS,
-                          DoubleAPFloat &Out, roundingMode RM);
+  LLVM_ABI opStatus addWithSpecial(const DoubleAPFloat &LHS,
+                                   const DoubleAPFloat &RHS, DoubleAPFloat &Out,
+                                   roundingMode RM);
 
 public:
   LLVM_ABI DoubleAPFloat(const fltSemantics &S);
   LLVM_ABI DoubleAPFloat(const fltSemantics &S, uninitializedTag);
   LLVM_ABI DoubleAPFloat(const fltSemantics &S, integerPart);
   LLVM_ABI DoubleAPFloat(const fltSemantics &S, const APInt &I);
-  LLVM_ABI DoubleAPFloat(const fltSemantics &S, APFloat &&First, APFloat &&Second);
+  LLVM_ABI DoubleAPFloat(const fltSemantics &S, APFloat &&First,
+                         APFloat &&Second);
   LLVM_ABI DoubleAPFloat(const DoubleAPFloat &RHS);
   LLVM_ABI DoubleAPFloat(DoubleAPFloat &&RHS);
   LLVM_ABI ~DoubleAPFloat();
@@ -844,7 +858,8 @@ public:
   LLVM_ABI opStatus remainder(const DoubleAPFloat &RHS);
   LLVM_ABI opStatus mod(const DoubleAPFloat &RHS);
   LLVM_ABI opStatus fusedMultiplyAdd(const DoubleAPFloat &Multiplicand,
-                            const DoubleAPFloat &Addend, roundingMode RM);
+                                     const DoubleAPFloat &Addend,
+                                     roundingMode RM);
   LLVM_ABI opStatus roundToIntegral(roundingMode RM);
   LLVM_ABI void changeSign();
   LLVM_ABI cmpResult compareAbsoluteValue(const DoubleAPFloat &RHS) const;
@@ -866,17 +881,21 @@ public:
   LLVM_ABI opStatus next(bool nextDown);
 
   LLVM_ABI opStatus convertToInteger(MutableArrayRef<integerPart> Input,
-                            unsigned int Width, bool IsSigned, roundingMode RM,
-                            bool *IsExact) const;
-  LLVM_ABI opStatus convertFromAPInt(const APInt &Input, bool IsSigned, roundingMode RM);
+                                     unsigned int Width, bool IsSigned,
+                                     roundingMode RM, bool *IsExact) const;
+  LLVM_ABI opStatus convertFromAPInt(const APInt &Input, bool IsSigned,
+                                     roundingMode RM);
   LLVM_ABI opStatus convertFromSignExtendedInteger(const integerPart *Input,
-                                          unsigned int InputSize, bool IsSigned,
-                                          roundingMode RM);
+                                                   unsigned int InputSize,
+                                                   bool IsSigned,
+                                                   roundingMode RM);
   LLVM_ABI opStatus convertFromZeroExtendedInteger(const integerPart *Input,
-                                          unsigned int InputSize, bool IsSigned,
-                                          roundingMode RM);
+                                                   unsigned int InputSize,
+                                                   bool IsSigned,
+                                                   roundingMode RM);
   LLVM_ABI unsigned int convertToHexString(char *DST, unsigned int HexDigits,
-                                  bool UpperCase, roundingMode RM) const;
+                                           bool UpperCase,
+                                           roundingMode RM) const;
 
   LLVM_ABI bool isDenormal() const;
   LLVM_ABI bool isSmallest() const;
@@ -885,22 +904,24 @@ public:
   LLVM_ABI bool isInteger() const;
 
   LLVM_ABI void toString(SmallVectorImpl<char> &Str, unsigned FormatPrecision,
-                unsigned FormatMaxPadding, bool TruncateZero = true) const;
+                         unsigned FormatMaxPadding,
+                         bool TruncateZero = true) const;
 
   LLVM_ABI bool getExactInverse(APFloat *inv) const;
 
-  LLVM_ABI LLVM_READONLY
-  int getExactLog2() const;
-  LLVM_ABI LLVM_READONLY
-  int getExactLog2Abs() const;
+  LLVM_ABI LLVM_READONLY int getExactLog2() const;
+  LLVM_ABI LLVM_READONLY int getExactLog2Abs() const;
 
-  LLVM_ABI friend DoubleAPFloat scalbn(const DoubleAPFloat &X, int Exp, roundingMode);
-  LLVM_ABI friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp, roundingMode);
+  LLVM_ABI friend DoubleAPFloat scalbn(const DoubleAPFloat &X, int Exp,
+                                       roundingMode);
+  LLVM_ABI friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp,
+                                      roundingMode);
   LLVM_ABI friend hash_code hash_value(const DoubleAPFloat &Arg);
 };
 
 LLVM_ABI hash_code hash_value(const DoubleAPFloat &Arg);
-LLVM_ABI DoubleAPFloat scalbn(const DoubleAPFloat &Arg, int Exp, roundingMode RM);
+LLVM_ABI DoubleAPFloat scalbn(const DoubleAPFloat &Arg, int Exp,
+                              roundingMode RM);
 LLVM_ABI DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp, roundingMode);
 
 } // End detail namespace
@@ -1328,7 +1349,7 @@ public:
   }
 
   LLVM_ABI opStatus convert(const fltSemantics &ToSemantics, roundingMode RM,
-                   bool *losesInfo);
+                            bool *losesInfo);
   opStatus convertToInteger(MutableArrayRef<integerPart> Input,
                             unsigned int Width, bool IsSigned, roundingMode RM,
                             bool *IsExact) const {
@@ -1336,7 +1357,7 @@ public:
         convertToInteger(Input, Width, IsSigned, RM, IsExact));
   }
   LLVM_ABI opStatus convertToInteger(APSInt &Result, roundingMode RM,
-                            bool *IsExact) const;
+                                     bool *IsExact) const;
   opStatus convertFromAPInt(const APInt &Input, bool IsSigned,
                             roundingMode RM) {
     APFLOAT_DISPATCH_ON_SEMANTICS(convertFromAPInt(Input, IsSigned, RM));
diff --git a/llvm/include/llvm/ADT/APInt.h b/llvm/include/llvm/ADT/APInt.h
index fd138aa53..dbf178064 100644
--- a/llvm/include/llvm/ADT/APInt.h
+++ b/llvm/include/llvm/ADT/APInt.h
@@ -2352,13 +2352,13 @@ LLVM_ABI APInt RoundingSDiv(const APInt &A, const APInt &B, APInt::Rounding RM);
 ///
 /// The returned value may have a different bit width from the input
 /// coefficients.
-LLVM_ABI std::optional<APInt> SolveQuadraticEquationWrap(APInt A, APInt B, APInt C,
-                                                unsigned RangeWidth);
+LLVM_ABI std::optional<APInt>
+SolveQuadraticEquationWrap(APInt A, APInt B, APInt C, unsigned RangeWidth);
 
 /// Compare two values, and if they are different, return the position of the
 /// most significant bit that is different in the values.
 LLVM_ABI std::optional<unsigned> GetMostSignificantDifferentBit(const APInt &A,
-                                                       const APInt &B);
+                                                                const APInt &B);
 
 /// Splat/Merge neighboring bits to widen/narrow the bitmask represented
 /// by \param A to \param NewBitWidth bits.
@@ -2372,7 +2372,7 @@ LLVM_ABI std::optional<unsigned> GetMostSignificantDifferentBit(const APInt &A,
 /// e.g. ScaleBitMask(0b00011011, 4) -> 0b0001
 /// A.getBitwidth() or NewBitWidth must be a whole multiples of the other.
 LLVM_ABI APInt ScaleBitMask(const APInt &A, unsigned NewBitWidth,
-                   bool MatchAllBits = false);
+                            bool MatchAllBits = false);
 } // namespace APIntOps
 
 // See friend declaration above. This additional declaration is required in
@@ -2381,11 +2381,13 @@ LLVM_ABI hash_code hash_value(const APInt &Arg);
 
 /// StoreIntToMemory - Fills the StoreBytes bytes of memory starting from Dst
 /// with the integer held in IntVal.
-LLVM_ABI void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst, unsigned StoreBytes);
+LLVM_ABI void StoreIntToMemory(const APInt &IntVal, uint8_t *Dst,
+                               unsigned StoreBytes);
 
 /// LoadIntFromMemory - Loads the integer stored in the LoadBytes bytes starting
 /// from Src into IntVal, which is assumed to be wide enough and to hold zero.
-LLVM_ABI void LoadIntFromMemory(APInt &IntVal, const uint8_t *Src, unsigned LoadBytes);
+LLVM_ABI void LoadIntFromMemory(APInt &IntVal, const uint8_t *Src,
+                                unsigned LoadBytes);
 
 /// Provide DenseMapInfo for APInt.
 template <> struct DenseMapInfo<APInt, void> {
diff --git a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h b/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h
index 53959dcde..a214df6e8 100644
--- a/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h
+++ b/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h
@@ -63,7 +63,7 @@ public:
   /// \f$ x \in S \f$ implies \f$ y \in S \f$. It is an error to have cyclic
   /// dependencies.
   LLVM_ABI changeset_ty Run(const changeset_ty &Changes,
-                   const std::vector<edge_ty> &Dependencies);
+                            const std::vector<edge_ty> &Dependencies);
 
   /// UpdatedSearchState - Callback used when the search state changes.
   virtual void UpdatedSearchState(const changeset_ty &Changes,
diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h
index 624726543..acf2a0281 100644
--- a/llvm/include/llvm/ADT/FoldingSet.h
+++ b/llvm/include/llvm/ADT/FoldingSet.h
@@ -195,7 +195,8 @@ private:
   /// GrowBucketCount - resize the hash table and rehash everything.
   /// NewBucketCount must be a power of two, and must be greater than the old
   /// bucket count.
-  LLVM_ABI void GrowBucketCount(unsigned NewBucketCount, const FoldingSetInfo &Info);
+  LLVM_ABI void GrowBucketCount(unsigned NewBucketCount,
+                                const FoldingSetInfo &Info);
 
 protected:
   // The below methods are protected to encourage subclasses to provide a more
@@ -218,13 +219,15 @@ protected:
   /// FindNodeOrInsertPos - Look up the node specified by ID.  If it exists,
   /// return it.  If not, return the insertion token that will make insertion
   /// faster.
-  LLVM_ABI Node *FindNodeOrInsertPos(const FoldingSetNodeID &ID, void *&InsertPos,
-                            const FoldingSetInfo &Info);
+  LLVM_ABI Node *FindNodeOrInsertPos(const FoldingSetNodeID &ID,
+                                     void *&InsertPos,
+                                     const FoldingSetInfo &Info);
 
   /// InsertNode - Insert the specified node into the folding set, knowing that
   /// it is not already in the folding set.  InsertPos must be obtained from
   /// FindNodeOrInsertPos.
-  LLVM_ABI void InsertNode(Node *N, void *InsertPos, const FoldingSetInfo &Info);
+  LLVM_ABI void InsertNode(Node *N, void *InsertPos,
+                           const FoldingSetInfo &Info);
 };
 
 //===----------------------------------------------------------------------===//
diff --git a/llvm/include/llvm/ADT/IntervalMap.h b/llvm/include/llvm/ADT/IntervalMap.h
index 74f863f6e..3463194fb 100644
--- a/llvm/include/llvm/ADT/IntervalMap.h
+++ b/llvm/include/llvm/ADT/IntervalMap.h
@@ -412,9 +412,9 @@ void adjustSiblingSizes(NodeT *Node[], unsigned Nodes,
 /// @param Position Insert position.
 /// @param Grow     Reserve space for a new element at Position.
 /// @return         (node, offset) for Position.
-LLVM_ABI IdxPair distribute(unsigned Nodes, unsigned Elements, unsigned Capacity,
-                   const unsigned *CurSize, unsigned NewSize[],
-                   unsigned Position, bool Grow);
+LLVM_ABI IdxPair distribute(unsigned Nodes, unsigned Elements,
+                            unsigned Capacity, const unsigned *CurSize,
+                            unsigned NewSize[], unsigned Position, bool Grow);
 
 //===----------------------------------------------------------------------===//
 //---                   IntervalMapImpl::NodeSizer                         ---//
diff --git a/llvm/include/llvm/ADT/RewriteBuffer.h b/llvm/include/llvm/ADT/RewriteBuffer.h
index a6f91fcfb..b39271849 100644
--- a/llvm/include/llvm/ADT/RewriteBuffer.h
+++ b/llvm/include/llvm/ADT/RewriteBuffer.h
@@ -62,12 +62,13 @@ public:
 
   /// RemoveText - Remove the specified text.
   LLVM_ABI void RemoveText(unsigned OrigOffset, unsigned Size,
-                  bool removeLineIfEmpty = false);
+                           bool removeLineIfEmpty = false);
 
   /// InsertText - Insert some text at the specified point, where the offset in
   /// the buffer is specified relative to the original SourceBuffer.  The
   /// text is inserted after the specified location.
-  LLVM_ABI void InsertText(unsigned OrigOffset, StringRef Str, bool InsertAfter = true);
+  LLVM_ABI void InsertText(unsigned OrigOffset, StringRef Str,
+                           bool InsertAfter = true);
 
   /// InsertTextBefore - Insert some text before the specified point, where the
   /// offset in the buffer is specified relative to the original
@@ -87,7 +88,8 @@ public:
   /// ReplaceText - This method replaces a range of characters in the input
   /// buffer with a new string.  This is effectively a combined "remove/insert"
   /// operation.
-  LLVM_ABI void ReplaceText(unsigned OrigOffset, unsigned OrigLength, StringRef NewStr);
+  LLVM_ABI void ReplaceText(unsigned OrigOffset, unsigned OrigLength,
+                            StringRef NewStr);
 
 private:
   /// getMappedOffset - Given an offset into the original SourceBuffer that this
diff --git a/llvm/include/llvm/ADT/SlowDynamicAPInt.h b/llvm/include/llvm/ADT/SlowDynamicAPInt.h
index 521665b81..6a63645d2 100644
--- a/llvm/include/llvm/ADT/SlowDynamicAPInt.h
+++ b/llvm/include/llvm/ADT/SlowDynamicAPInt.h
@@ -64,12 +64,12 @@ public:
 
   LLVM_ABI friend SlowDynamicAPInt abs(const SlowDynamicAPInt &X);
   LLVM_ABI friend SlowDynamicAPInt ceilDiv(const SlowDynamicAPInt &LHS,
-                                  const SlowDynamicAPInt &RHS);
+                                           const SlowDynamicAPInt &RHS);
   LLVM_ABI friend SlowDynamicAPInt floorDiv(const SlowDynamicAPInt &LHS,
-                                   const SlowDynamicAPInt &RHS);
+                                            const SlowDynamicAPInt &RHS);
   /// The operands must be non-negative for gcd.
   LLVM_ABI friend SlowDynamicAPInt gcd(const SlowDynamicAPInt &A,
-                              const SlowDynamicAPInt &B);
+                                       const SlowDynamicAPInt &B);
 
   /// Overload to compute a hash_code for a SlowDynamicAPInt value.
   LLVM_ABI friend hash_code hash_value(const SlowDynamicAPInt &X); // NOLINT
@@ -92,19 +92,22 @@ inline raw_ostream &operator<<(raw_ostream &OS, const SlowDynamicAPInt &X) {
 ///
 /// The RHS is always expected to be positive, and the result
 /// is always non-negative.
-LLVM_ABI SlowDynamicAPInt mod(const SlowDynamicAPInt &LHS, const SlowDynamicAPInt &RHS);
+LLVM_ABI SlowDynamicAPInt mod(const SlowDynamicAPInt &LHS,
+                              const SlowDynamicAPInt &RHS);
 
 /// Returns the least common multiple of A and B.
-LLVM_ABI SlowDynamicAPInt lcm(const SlowDynamicAPInt &A, const SlowDynamicAPInt &B);
+LLVM_ABI SlowDynamicAPInt lcm(const SlowDynamicAPInt &A,
+                              const SlowDynamicAPInt &B);
 
 /// Redeclarations of friend declarations above to
 /// make it discoverable by lookups.
 LLVM_ABI SlowDynamicAPInt abs(const SlowDynamicAPInt &X);
 LLVM_ABI SlowDynamicAPInt ceilDiv(const SlowDynamicAPInt &LHS,
-                         const SlowDynamicAPInt &RHS);
+                                  const SlowDynamicAPInt &RHS);
 LLVM_ABI SlowDynamicAPInt floorDiv(const SlowDynamicAPInt &LHS,
-                          const SlowDynamicAPInt &RHS);
-LLVM_ABI SlowDynamicAPInt gcd(const SlowDynamicAPInt &A, const SlowDynamicAPInt &B);
+                                   const SlowDynamicAPInt &RHS);
+LLVM_ABI SlowDynamicAPInt gcd(const SlowDynamicAPInt &A,
+                              const SlowDynamicAPInt &B);
 LLVM_ABI hash_code hash_value(const SlowDynamicAPInt &X); // NOLINT
 
 /// ---------------------------------------------------------------------------
diff --git a/llvm/include/llvm/ADT/SmallPtrSet.h b/llvm/include/llvm/ADT/SmallPtrSet.h
index 58a184016..037f23037 100644
--- a/llvm/include/llvm/ADT/SmallPtrSet.h
+++ b/llvm/include/llvm/ADT/SmallPtrSet.h
@@ -72,9 +72,10 @@ protected:
 
   // Helpers to copy and move construct a SmallPtrSet.
   LLVM_ABI SmallPtrSetImplBase(const void **SmallStorage,
-                      const SmallPtrSetImplBase &that);
+                               const SmallPtrSetImplBase &that);
   LLVM_ABI SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize,
-                      const void **RHSSmallStorage, SmallPtrSetImplBase &&that);
+                               const void **RHSSmallStorage,
+                               SmallPtrSetImplBase &&that);
 
   explicit SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize)
       : CurArray(SmallStorage), CurArraySize(SmallSize), NumNonEmpty(0),
@@ -239,7 +240,7 @@ private:
   LLVM_ABI std::pair<const void *const *, bool> insert_imp_big(const void *Ptr);
 
   LLVM_ABI const void *const *doFind(const void *Ptr) const;
-  LLVM_ABI const void * const *FindBucketFor(const void *Ptr) const;
+  LLVM_ABI const void *const *FindBucketFor(const void *Ptr) const;
   LLVM_ABI void shrink_and_clear();
 
   /// Grow - Allocate a larger backing store for the buckets and move it over.
@@ -249,16 +250,19 @@ protected:
   /// swap - Swaps the elements of two sets.
   /// Note: This method assumes that both sets have the same small size.
   LLVM_ABI void swap(const void **SmallStorage, const void **RHSSmallStorage,
-            SmallPtrSetImplBase &RHS);
+                     SmallPtrSetImplBase &RHS);
 
-  LLVM_ABI void copyFrom(const void **SmallStorage, const SmallPtrSetImplBase &RHS);
+  LLVM_ABI void copyFrom(const void **SmallStorage,
+                         const SmallPtrSetImplBase &RHS);
   LLVM_ABI void moveFrom(const void **SmallStorage, unsigned SmallSize,
-                const void **RHSSmallStorage, SmallPtrSetImplBase &&RHS);
+                         const void **RHSSmallStorage,
+                         SmallPtrSetImplBase &&RHS);
 
 private:
   /// Code shared by moveFrom() and move constructor.
   LLVM_ABI void moveHelper(const void **SmallStorage, unsigned SmallSize,
-                  const void **RHSSmallStorage, SmallPtrSetImplBase &&RHS);
+                           const void **RHSSmallStorage,
+                           SmallPtrSetImplBase &&RHS);
   /// Code shared by copyFrom() and copy constructor.
   LLVM_ABI void copyHelper(const SmallPtrSetImplBase &RHS);
 };
diff --git a/llvm/include/llvm/ADT/StringExtras.h b/llvm/include/llvm/ADT/StringExtras.h
index 9fc34c9b9..a2cc36dd8 100644
--- a/llvm/include/llvm/ADT/StringExtras.h
+++ b/llvm/include/llvm/ADT/StringExtras.h
@@ -364,14 +364,14 @@ LLVM_ABI StringRef::size_type StrInStrNoCase(StringRef s1, StringRef s2);
 /// there are no tokens in the source string, an empty string is returned.
 /// The function returns a pair containing the extracted token and the
 /// remaining tail string.
-LLVM_ABI std::pair<StringRef, StringRef> getToken(StringRef Source,
-                                         StringRef Delimiters = " \t\n\v\f\r");
+LLVM_ABI std::pair<StringRef, StringRef>
+getToken(StringRef Source, StringRef Delimiters = " \t\n\v\f\r");
 
 /// SplitString - Split up the specified string according to the specified
 /// delimiters, appending the result fragments to the output list.
 LLVM_ABI void SplitString(StringRef Source,
-                 SmallVectorImpl<StringRef> &OutFragments,
-                 StringRef Delimiters = " \t\n\v\f\r");
+                          SmallVectorImpl<StringRef> &OutFragments,
+                          StringRef Delimiters = " \t\n\v\f\r");
 
 /// Returns the English suffix for an ordinal integer (-st, -nd, -rd, -th).
 inline StringRef getOrdinalSuffix(unsigned Val) {
@@ -413,7 +413,7 @@ LLVM_ABI std::string convertToSnakeFromCamelCase(StringRef input);
 /// Optionally allow capitalization of the first letter (if it is a lowercase
 /// letter)
 LLVM_ABI std::string convertToCamelFromSnakeCase(StringRef input,
-                                        bool capitalizeFirst = false);
+                                                 bool capitalizeFirst = false);
 
 namespace detail {
 
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h
index 3fd7be761..0ced1c037 100644
--- a/llvm/include/llvm/ADT/StringRef.h
+++ b/llvm/include/llvm/ADT/StringRef.h
@@ -33,13 +33,15 @@ namespace llvm {
 
   /// Helper functions for StringRef::getAsInteger.
   LLVM_ABI bool getAsUnsignedInteger(StringRef Str, unsigned Radix,
-                            unsigned long long &Result);
+                                     unsigned long long &Result);
 
-  LLVM_ABI bool getAsSignedInteger(StringRef Str, unsigned Radix, long long &Result);
+  LLVM_ABI bool getAsSignedInteger(StringRef Str, unsigned Radix,
+                                   long long &Result);
 
   LLVM_ABI bool consumeUnsignedInteger(StringRef &Str, unsigned Radix,
-                              unsigned long long &Result);
-  LLVM_ABI bool consumeSignedInteger(StringRef &Str, unsigned Radix, long long &Result);
+                                       unsigned long long &Result);
+  LLVM_ABI bool consumeSignedInteger(StringRef &Str, unsigned Radix,
+                                     long long &Result);
 
   /// StringRef - Represent a constant reference to a string, i.e. a character
   /// array and a length, which need not be null terminated.
@@ -217,9 +219,9 @@ namespace llvm {
     /// or (if \p AllowReplacements is \c true) replacements needed to
     /// transform one of the given strings into the other. If zero,
     /// the strings are identical.
-    [[nodiscard]] LLVM_ABI unsigned edit_distance(StringRef Other,
-                                         bool AllowReplacements = true,
-                                         unsigned MaxEditDistance = 0) const;
+    [[nodiscard]] LLVM_ABI unsigned
+    edit_distance(StringRef Other, bool AllowReplacements = true,
+                  unsigned MaxEditDistance = 0) const;
 
     [[nodiscard]] LLVM_ABI unsigned
     edit_distance_insensitive(StringRef Other, bool AllowReplacements = true,
@@ -302,7 +304,8 @@ namespace llvm {
     ///
     /// \returns The index of the first occurrence of \p C, or npos if not
     /// found.
-    [[nodiscard]] LLVM_ABI size_t find_insensitive(char C, size_t From = 0) const;
+    [[nodiscard]] LLVM_ABI size_t find_insensitive(char C,
+                                                   size_t From = 0) const;
 
     /// Search for the first character satisfying the predicate \p F
     ///
@@ -338,7 +341,8 @@ namespace llvm {
     ///
     /// \returns The index of the first occurrence of \p Str, or npos if not
     /// found.
-    [[nodiscard]] LLVM_ABI size_t find_insensitive(StringRef Str, size_t From = 0) const;
+    [[nodiscard]] LLVM_ABI size_t find_insensitive(StringRef Str,
+                                                   size_t From = 0) const;
 
     /// Search for the last character \p C in the string.
     ///
@@ -358,7 +362,8 @@ namespace llvm {
     ///
     /// \returns The index of the last occurrence of \p C, or npos if not
     /// found.
-    [[nodiscard]] LLVM_ABI size_t rfind_insensitive(char C, size_t From = npos) const;
+    [[nodiscard]] LLVM_ABI size_t rfind_insensitive(char C,
+                                                    size_t From = npos) const;
 
     /// Search for the last string \p Str in the string.
     ///
@@ -382,18 +387,20 @@ namespace llvm {
     /// not found.
     ///
     /// Complexity: O(size() + Chars.size())
-    [[nodiscard]] LLVM_ABI size_t find_first_of(StringRef Chars, size_t From = 0) const;
+    [[nodiscard]] LLVM_ABI size_t find_first_of(StringRef Chars,
+                                                size_t From = 0) const;
 
     /// Find the first character in the string that is not \p C or npos if not
     /// found.
-    [[nodiscard]] LLVM_ABI size_t find_first_not_of(char C, size_t From = 0) const;
+    [[nodiscard]] LLVM_ABI size_t find_first_not_of(char C,
+                                                    size_t From = 0) const;
 
     /// Find the first character in the string that is not in the string
     /// \p Chars, or npos if not found.
     ///
     /// Complexity: O(size() + Chars.size())
     [[nodiscard]] LLVM_ABI size_t find_first_not_of(StringRef Chars,
-                                           size_t From = 0) const;
+                                                    size_t From = 0) const;
 
     /// Find the last character in the string that is \p C, or npos if not
     /// found.
@@ -406,18 +413,19 @@ namespace llvm {
     ///
     /// Complexity: O(size() + Chars.size())
     [[nodiscard]] LLVM_ABI size_t find_last_of(StringRef Chars,
-                                      size_t From = npos) const;
+                                               size_t From = npos) const;
 
     /// Find the last character in the string that is not \p C, or npos if not
     /// found.
-    [[nodiscard]] LLVM_ABI size_t find_last_not_of(char C, size_t From = npos) const;
+    [[nodiscard]] LLVM_ABI size_t find_last_not_of(char C,
+                                                   size_t From = npos) const;
 
     /// Find the last character in the string that is not in \p Chars, or
     /// npos if not found.
     ///
     /// Complexity: O(size() + Chars.size())
     [[nodiscard]] LLVM_ABI size_t find_last_not_of(StringRef Chars,
-                                          size_t From = npos) const;
+                                                   size_t From = npos) const;
 
     /// Return true if the given string is a substring of *this, and false
     /// otherwise.
@@ -751,9 +759,8 @@ namespace llvm {
     /// \param Separator - The string to split on.
     /// \param MaxSplit - The maximum number of times the string is split.
     /// \param KeepEmpty - True if empty substring should be added.
-    LLVM_ABI void split(SmallVectorImpl<StringRef> &A,
-               StringRef Separator, int MaxSplit = -1,
-               bool KeepEmpty = true) const;
+    LLVM_ABI void split(SmallVectorImpl<StringRef> &A, StringRef Separator,
+                        int MaxSplit = -1, bool KeepEmpty = true) const;
 
     /// Split into substrings around the occurrences of a separator character.
     ///
@@ -769,8 +776,8 @@ namespace llvm {
     /// \param Separator - The string to split on.
     /// \param MaxSplit - The maximum number of times the string is split.
     /// \param KeepEmpty - True if empty substring should be added.
-    LLVM_ABI void split(SmallVectorImpl<StringRef> &A, char Separator, int MaxSplit = -1,
-               bool KeepEmpty = true) const;
+    LLVM_ABI void split(SmallVectorImpl<StringRef> &A, char Separator,
+                        int MaxSplit = -1, bool KeepEmpty = true) const;
 
     /// Split into two substrings around the last occurrence of a separator
     /// character.
diff --git a/llvm/include/llvm/ADT/Twine.h b/llvm/include/llvm/ADT/Twine.h
index 0235a1abe..d89daedc8 100644
--- a/llvm/include/llvm/ADT/Twine.h
+++ b/llvm/include/llvm/ADT/Twine.h
@@ -249,11 +249,12 @@ namespace llvm {
     NodeKind getRHSKind() const { return RHSKind; }
 
     /// Print one child from a twine.
-    LLVM_ABI void printOneChild(raw_ostream &OS, Child Ptr, NodeKind Kind) const;
+    LLVM_ABI void printOneChild(raw_ostream &OS, Child Ptr,
+                                NodeKind Kind) const;
 
     /// Print the representation of one child from a twine.
     LLVM_ABI void printOneChildRepr(raw_ostream &OS, Child Ptr,
-                           NodeKind Kind) const;
+                                    NodeKind Kind) const;
 
   public:
     /// @name Constructors
@@ -502,7 +503,8 @@ namespace llvm {
     /// given SmallVector and a StringRef to the SmallVector's data is returned.
     ///
     /// The returned StringRef's size does not include the null terminator.
-    LLVM_ABI StringRef toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const;
+    LLVM_ABI StringRef
+    toNullTerminatedStringRef(SmallVectorImpl<char> &Out) const;
 
     /// Write the concatenated string represented by this twine to the
     /// stream \p OS.

``````````

</details>


https://github.com/llvm/llvm-project/pull/136629


More information about the llvm-commits mailing list