Skip to content

Commit d385dc2

Browse files
committed
[llvm] remove LLVM_ABI_FRIEND in favor of LLVM_ABI
1 parent 2b8ec5d commit d385dc2

File tree

18 files changed

+43
-56
lines changed

18 files changed

+43
-56
lines changed

llvm/include/llvm/ADT/APFloat.h

Lines changed: 10 additions & 11 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-
LLVM_ABI_FRIEND friend hash_code hash_value(const IEEEFloat &Arg);
575+
LLVM_ABI friend hash_code hash_value(const IEEEFloat &Arg);
576576

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

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

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

640639
/// \name Special value setters.
641640
/// @{
@@ -906,11 +905,11 @@ class DoubleAPFloat final {
906905
LLVM_ABI LLVM_READONLY int getExactLog2() const;
907906
LLVM_ABI LLVM_READONLY int getExactLog2Abs() const;
908907

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);
908+
LLVM_ABI friend DoubleAPFloat scalbn(const DoubleAPFloat &X, int Exp,
909+
roundingMode);
910+
LLVM_ABI friend DoubleAPFloat frexp(const DoubleAPFloat &X, int &Exp,
911+
roundingMode);
912+
LLVM_ABI friend hash_code hash_value(const DoubleAPFloat &Arg);
914913
};
915914

916915
LLVM_ABI hash_code hash_value(const DoubleAPFloat &Arg);
@@ -1518,7 +1517,7 @@ class APFloat : public APFloatBase {
15181517
APFLOAT_DISPATCH_ON_SEMANTICS(getExactLog2());
15191518
}
15201519

1521-
LLVM_ABI_FRIEND friend hash_code hash_value(const APFloat &Arg);
1520+
LLVM_ABI friend hash_code hash_value(const APFloat &Arg);
15221521
friend int ilogb(const APFloat &Arg) { return ilogb(Arg.getIEEE()); }
15231522
friend APFloat scalbn(APFloat X, int Exp, roundingMode RM);
15241523
friend APFloat frexp(const APFloat &X, int &Exp, roundingMode RM);

llvm/include/llvm/ADT/SlowDynamicAPInt.h

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

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

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

7877
// Make DynamicAPInt a friend so it can access Val directly.
7978
friend DynamicAPInt;

llvm/include/llvm/Bitcode/BitcodeReader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct ParserCallbacks {
120120
IdentificationBit(IdentificationBit), ModuleBit(ModuleBit) {}
121121

122122
// Calls the ctor.
123-
LLVM_ABI_FRIEND friend Expected<BitcodeFileContents>
123+
LLVM_ABI friend Expected<BitcodeFileContents>
124124
getBitcodeFileContents(MemoryBufferRef Buffer);
125125

126126
Expected<std::unique_ptr<Module>>

llvm/include/llvm/CodeGen/MachineOperand.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ class MachineOperand {
764764
/// isIdenticalTo uses for comparison. It is thus suited for use in hash
765765
/// tables which use that function for equality comparisons only. This must
766766
/// stay exactly in sync with isIdenticalTo above.
767-
LLVM_ABI_FRIEND friend hash_code hash_value(const MachineOperand &MO);
767+
LLVM_ABI friend hash_code hash_value(const MachineOperand &MO);
768768

769769
/// ChangeToImmediate - Replace this operand with a new immediate operand of
770770
/// the specified value. If an operand is known to be an immediate already,

llvm/include/llvm/CodeGen/PseudoSourceValue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ class LLVM_ABI PseudoSourceValue {
4646
private:
4747
unsigned Kind;
4848
unsigned AddressSpace;
49-
LLVM_ABI_FRIEND friend raw_ostream &
50-
llvm::operator<<(raw_ostream &OS, const PseudoSourceValue *PSV);
49+
LLVM_ABI friend raw_ostream &llvm::operator<<(raw_ostream &OS,
50+
const PseudoSourceValue *PSV);
5151

5252
friend class MachineMemOperand; // For printCustom().
5353
friend class MIRFormatter; // For printCustom().

llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ class ExecutorProcessControl;
4242
class LLVM_ABI LLJIT {
4343
template <typename, typename, typename> friend class LLJITBuilderSetters;
4444

45-
LLVM_ABI_FRIEND friend Expected<JITDylibSP>
46-
setUpGenericLLVMIRPlatform(LLJIT &J);
45+
LLVM_ABI friend Expected<JITDylibSP> setUpGenericLLVMIRPlatform(LLJIT &J);
4746

4847
public:
4948
/// Initializer support for LLJIT.

llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class SymbolStringPool {
3636
friend class SymbolStringPoolEntryUnsafe;
3737

3838
// Implemented in DebugUtils.h.
39-
LLVM_ABI_FRIEND friend raw_ostream &operator<<(raw_ostream &OS,
40-
const SymbolStringPool &SSP);
39+
LLVM_ABI friend raw_ostream &operator<<(raw_ostream &OS,
40+
const SymbolStringPool &SSP);
4141

4242
public:
4343
/// Destroy a SymbolStringPool.
@@ -94,8 +94,8 @@ class SymbolStringPtrBase {
9494
return LHS.S < RHS.S;
9595
}
9696

97-
LLVM_ABI_FRIEND friend raw_ostream &
98-
operator<<(raw_ostream &OS, const SymbolStringPtrBase &Sym);
97+
LLVM_ABI friend raw_ostream &operator<<(raw_ostream &OS,
98+
const SymbolStringPtrBase &Sym);
9999

100100
#ifndef NDEBUG
101101
// Returns true if the pool entry's ref count is above zero (or if the entry

llvm/include/llvm/ExecutionEngine/RuntimeDyld.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class RuntimeDyld {
287287
LLVM_ABI void finalizeWithMemoryManagerLocking();
288288

289289
private:
290-
LLVM_ABI_FRIEND friend void jitLinkForORC(
290+
LLVM_ABI friend void jitLinkForORC(
291291
object::OwningBinary<object::ObjectFile> O,
292292
RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver,
293293
bool ProcessAllSections,

llvm/include/llvm/IR/Function.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,9 +783,8 @@ class LLVM_ABI Function : public GlobalObject, public ilist_node<Function> {
783783

784784
private:
785785
// These need access to the underlying BB list.
786-
LLVM_ABI_FRIEND friend void BasicBlock::removeFromParent();
787-
LLVM_ABI_FRIEND friend iplist<BasicBlock>::iterator
788-
BasicBlock::eraseFromParent();
786+
LLVM_ABI friend void BasicBlock::removeFromParent();
787+
LLVM_ABI friend iplist<BasicBlock>::iterator BasicBlock::eraseFromParent();
789788
template <class BB_t, class BB_i_t, class BI_t, class II_t>
790789
friend class InstIterator;
791790
friend class llvm::SymbolTableListTraits<llvm::BasicBlock>;

llvm/include/llvm/ProfileData/SampleProfWriter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class LLVM_ABI SampleProfileWriterText : public SampleProfileWriter {
193193
/// cannot be skipped.
194194
bool MarkFlatProfiles = false;
195195

196-
LLVM_ABI_FRIEND friend ErrorOr<std::unique_ptr<SampleProfileWriter>>
196+
LLVM_ABI friend ErrorOr<std::unique_ptr<SampleProfileWriter>>
197197
SampleProfileWriter::create(std::unique_ptr<raw_ostream> &OS,
198198
SampleProfileFormat Format);
199199
};
@@ -225,7 +225,7 @@ class LLVM_ABI SampleProfileWriterBinary : public SampleProfileWriter {
225225
void addNames(const FunctionSamples &S);
226226

227227
private:
228-
LLVM_ABI_FRIEND friend ErrorOr<std::unique_ptr<SampleProfileWriter>>
228+
LLVM_ABI friend ErrorOr<std::unique_ptr<SampleProfileWriter>>
229229
SampleProfileWriter::create(std::unique_ptr<raw_ostream> &OS,
230230
SampleProfileFormat Format);
231231
};

0 commit comments

Comments
 (0)