Skip to content

Commit ccf7acd

Browse files
committed
[llvm] manual fix-ups to IDS codemod
1 parent f802efe commit ccf7acd

File tree

4 files changed

+25
-19
lines changed

4 files changed

+25
-19
lines changed

llvm/include/llvm/ADT/APFloat.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ class IEEEFloat final {
572572
/// emphasizes producing different codes for different inputs in order to
573573
/// be used in canonicalization and memoization. As such, equality is
574574
/// bitwiseIsEqual, and 0 != -0.
575-
friend hash_code hash_value(const IEEEFloat &Arg);
575+
LLVM_ABI_FRIEND friend hash_code hash_value(const IEEEFloat &Arg);
576576

577577
/// Converts this value into a decimal string.
578578
///
@@ -629,12 +629,13 @@ class IEEEFloat final {
629629
/// 0 -> \c IEK_Zero
630630
/// Inf -> \c IEK_Inf
631631
///
632-
friend int ilogb(const IEEEFloat &Arg);
632+
LLVM_ABI_FRIEND friend int ilogb(const IEEEFloat &Arg);
633633

634634
/// Returns: X * 2^Exp for integral exponents.
635-
friend IEEEFloat scalbn(IEEEFloat X, int Exp, roundingMode);
635+
LLVM_ABI_FRIEND friend IEEEFloat scalbn(IEEEFloat X, int Exp, roundingMode);
636636

637-
friend IEEEFloat frexp(const IEEEFloat &X, int &Exp, roundingMode);
637+
LLVM_ABI_FRIEND friend IEEEFloat frexp(const IEEEFloat &X, int &Exp,
638+
roundingMode);
638639

639640
/// \name Special value setters.
640641
/// @{
@@ -905,9 +906,11 @@ class DoubleAPFloat final {
905906
LLVM_ABI LLVM_READONLY int getExactLog2() const;
906907
LLVM_ABI LLVM_READONLY int getExactLog2Abs() const;
907908

908-
friend DoubleAPFloat scalbn(const DoubleAPFloat &X, int Exp, roundingMode);
909-
friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp, roundingMode);
910-
friend hash_code hash_value(const DoubleAPFloat &Arg);
909+
LLVM_ABI_FRIEND friend DoubleAPFloat scalbn(const DoubleAPFloat &X, int Exp,
910+
roundingMode);
911+
LLVM_ABI_FRIEND friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp,
912+
roundingMode);
913+
LLVM_ABI_FRIEND friend hash_code hash_value(const DoubleAPFloat &Arg);
911914
};
912915

913916
LLVM_ABI hash_code hash_value(const DoubleAPFloat &Arg);
@@ -1512,7 +1515,7 @@ class APFloat : public APFloatBase {
15121515
APFLOAT_DISPATCH_ON_SEMANTICS(getExactLog2());
15131516
}
15141517

1515-
friend hash_code hash_value(const APFloat &Arg);
1518+
LLVM_ABI_FRIEND friend hash_code hash_value(const APFloat &Arg);
15161519
friend int ilogb(const APFloat &Arg) { return ilogb(Arg.getIEEE()); }
15171520
friend APFloat scalbn(APFloat X, int Exp, roundingMode RM);
15181521
friend APFloat frexp(const APFloat &X, int &Exp, roundingMode RM);

llvm/include/llvm/ADT/DeltaTree.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef LLVM_ADT_DELTATREE_H
1414
#define LLVM_ADT_DELTATREE_H
1515

16+
#include "llvm/Support/Compiler.h"
17+
1618
namespace llvm {
1719

1820
/// DeltaTree - a multiway search tree (BTree) structure with some fancy

llvm/include/llvm/ADT/SlowDynamicAPInt.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,18 @@ class SlowDynamicAPInt {
6262
LLVM_ABI SlowDynamicAPInt &operator++();
6363
LLVM_ABI SlowDynamicAPInt &operator--();
6464

65-
friend SlowDynamicAPInt abs(const SlowDynamicAPInt &X);
66-
friend SlowDynamicAPInt ceilDiv(const SlowDynamicAPInt &LHS,
67-
const SlowDynamicAPInt &RHS);
68-
friend SlowDynamicAPInt floorDiv(const SlowDynamicAPInt &LHS,
69-
const SlowDynamicAPInt &RHS);
65+
LLVM_ABI_FRIEND friend SlowDynamicAPInt abs(const SlowDynamicAPInt &X);
66+
LLVM_ABI_FRIEND friend SlowDynamicAPInt ceilDiv(const SlowDynamicAPInt &LHS,
67+
const SlowDynamicAPInt &RHS);
68+
LLVM_ABI_FRIEND friend SlowDynamicAPInt floorDiv(const SlowDynamicAPInt &LHS,
69+
const SlowDynamicAPInt &RHS);
7070
/// The operands must be non-negative for gcd.
71-
friend SlowDynamicAPInt gcd(const SlowDynamicAPInt &A,
72-
const SlowDynamicAPInt &B);
71+
LLVM_ABI_FRIEND friend SlowDynamicAPInt gcd(const SlowDynamicAPInt &A,
72+
const SlowDynamicAPInt &B);
7373

7474
/// Overload to compute a hash_code for a SlowDynamicAPInt value.
75-
friend hash_code hash_value(const SlowDynamicAPInt &X); // NOLINT
75+
LLVM_ABI_FRIEND friend hash_code
76+
hash_value(const SlowDynamicAPInt &X); // NOLINT
7677

7778
// Make DynamicAPInt a friend so it can access Val directly.
7879
friend DynamicAPInt;

llvm/include/llvm/ADT/SmallVector.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ template <class Size_T> class SmallVectorBase {
6666
/// This is a helper for \a grow() that's out of line to reduce code
6767
/// duplication. This function will report a fatal error if it can't grow at
6868
/// least to \p MinSize.
69-
void *mallocForGrow(void *FirstEl, size_t MinSize, size_t TSize,
70-
size_t &NewCapacity);
69+
LLVM_ABI void *mallocForGrow(void *FirstEl, size_t MinSize, size_t TSize,
70+
size_t &NewCapacity);
7171

7272
/// This is an implementation of the grow() method which only works
7373
/// on POD-like data types and is out of line to reduce code duplication.
7474
/// This function will report a fatal error if it cannot increase capacity.
75-
void grow_pod(void *FirstEl, size_t MinSize, size_t TSize);
75+
LLVM_ABI void grow_pod(void *FirstEl, size_t MinSize, size_t TSize);
7676

7777
public:
7878
size_t size() const { return Size; }

0 commit comments

Comments
 (0)