Skip to content

Commit a92b393

Browse files
committed
clang-format
1 parent 796cfbb commit a92b393

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+822
-683
lines changed

llvm/include/llvm/Support/AMDGPUMetadata.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#ifndef LLVM_SUPPORT_AMDGPUMETADATA_H
1616
#define LLVM_SUPPORT_AMDGPUMETADATA_H
1717

18-
#include "llvm/Support/Compiler.h"
1918
#include "llvm/ADT/StringRef.h"
19+
#include "llvm/Support/Compiler.h"
2020
#include <cstdint>
2121
#include <string>
2222
#include <system_error>

llvm/include/llvm/Support/ARMAttributeParser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#ifndef LLVM_SUPPORT_ARMATTRIBUTEPARSER_H
1010
#define LLVM_SUPPORT_ARMATTRIBUTEPARSER_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "ARMBuildAttributes.h"
1413
#include "llvm/ADT/StringRef.h"
14+
#include "llvm/Support/Compiler.h"
1515
#include "llvm/Support/ELFAttrParserCompact.h"
1616
#include "llvm/Support/Error.h"
1717

llvm/include/llvm/Support/ARMWinEH.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef LLVM_SUPPORT_ARMWINEH_H
1010
#define LLVM_SUPPORT_ARMWINEH_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/ArrayRef.h"
13+
#include "llvm/Support/Compiler.h"
1414
#include "llvm/Support/Endian.h"
1515

1616
namespace llvm {
@@ -206,8 +206,8 @@ inline uint16_t StackAdjustment(const RuntimeFunction &RF) {
206206

207207
/// SavedRegisterMask - Utility function to calculate the set of saved general
208208
/// purpose (r0-r15) and VFP (d0-d31) registers.
209-
LLVM_ABI std::pair<uint16_t, uint32_t> SavedRegisterMask(const RuntimeFunction &RF,
210-
bool Prologue = true);
209+
LLVM_ABI std::pair<uint16_t, uint32_t>
210+
SavedRegisterMask(const RuntimeFunction &RF, bool Prologue = true);
211211

212212
/// RuntimeFunctionARM64 - An entry in the table of procedure data (.pdata)
213213
///

llvm/include/llvm/Support/Allocator.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ namespace detail {
3636

3737
// We call out to an external function to actually print the message as the
3838
// printing code uses Allocator.h in its implementation.
39-
LLVM_ABI void printBumpPtrAllocatorStats(unsigned NumSlabs, size_t BytesAllocated,
40-
size_t TotalMemory);
39+
LLVM_ABI void printBumpPtrAllocatorStats(unsigned NumSlabs,
40+
size_t BytesAllocated,
41+
size_t TotalMemory);
4142

4243
} // end namespace detail
4344

llvm/include/llvm/Support/BalancedPartitioning.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
#ifndef LLVM_SUPPORT_BALANCED_PARTITIONING_H
4040
#define LLVM_SUPPORT_BALANCED_PARTITIONING_H
4141

42-
#include "llvm/Support/Compiler.h"
4342
#include "raw_ostream.h"
4443
#include "llvm/ADT/ArrayRef.h"
44+
#include "llvm/Support/Compiler.h"
4545

4646
#include <atomic>
4747
#include <condition_variable>
@@ -194,7 +194,7 @@ class BalancedPartitioning {
194194
protected:
195195
/// Compute the move gain for uniform log-gap cost
196196
LLVM_ABI static float moveGain(const BPFunctionNode &N, bool FromLeftToRight,
197-
const SignaturesT &Signatures);
197+
const SignaturesT &Signatures);
198198
friend class BalancedPartitioningTest_MoveGain_Test;
199199
};
200200

llvm/include/llvm/Support/Base64.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ template <class InputBytes> std::string encodeBase64(InputBytes const &Bytes) {
5555
return Buffer;
5656
}
5757

58-
LLVM_ABI llvm::Error decodeBase64(llvm::StringRef Input, std::vector<char> &Output);
58+
LLVM_ABI llvm::Error decodeBase64(llvm::StringRef Input,
59+
std::vector<char> &Output);
5960

6061
} // end namespace llvm
6162

llvm/include/llvm/Support/BinaryStreamError.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef LLVM_SUPPORT_BINARYSTREAMERROR_H
1010
#define LLVM_SUPPORT_BINARYSTREAMERROR_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/StringRef.h"
13+
#include "llvm/Support/Compiler.h"
1414
#include "llvm/Support/Error.h"
1515

1616
#include <string>

llvm/include/llvm/Support/BinaryStreamReader.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#ifndef LLVM_SUPPORT_BINARYSTREAMREADER_H
1010
#define LLVM_SUPPORT_BINARYSTREAMREADER_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/ArrayRef.h"
1413
#include "llvm/ADT/StringRef.h"
1514
#include "llvm/Support/Alignment.h"
1615
#include "llvm/Support/BinaryStreamArray.h"
1716
#include "llvm/Support/BinaryStreamRef.h"
17+
#include "llvm/Support/Compiler.h"
1818
#include "llvm/Support/ConvertUTF.h"
1919
#include "llvm/Support/Endian.h"
2020
#include "llvm/Support/Error.h"
@@ -32,7 +32,8 @@ class BinaryStreamReader {
3232
BinaryStreamReader() = default;
3333
LLVM_ABI explicit BinaryStreamReader(BinaryStreamRef Ref);
3434
LLVM_ABI explicit BinaryStreamReader(BinaryStream &Stream);
35-
LLVM_ABI explicit BinaryStreamReader(ArrayRef<uint8_t> Data, llvm::endianness Endian);
35+
LLVM_ABI explicit BinaryStreamReader(ArrayRef<uint8_t> Data,
36+
llvm::endianness Endian);
3637
LLVM_ABI explicit BinaryStreamReader(StringRef Data, llvm::endianness Endian);
3738

3839
BinaryStreamReader(const BinaryStreamReader &Other) = default;

llvm/include/llvm/Support/BinaryStreamRef.h

+10-8
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
#ifndef LLVM_SUPPORT_BINARYSTREAMREF_H
1010
#define LLVM_SUPPORT_BINARYSTREAMREF_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/ArrayRef.h"
1413
#include "llvm/Support/BinaryStream.h"
1514
#include "llvm/Support/BinaryStreamError.h"
15+
#include "llvm/Support/Compiler.h"
1616
#include "llvm/Support/Error.h"
1717
#include <cstdint>
1818
#include <memory>
@@ -163,8 +163,9 @@ class BinaryStreamRef
163163
BinaryStreamRef() = default;
164164
LLVM_ABI BinaryStreamRef(BinaryStream &Stream);
165165
LLVM_ABI BinaryStreamRef(BinaryStream &Stream, uint64_t Offset,
166-
std::optional<uint64_t> Length);
167-
LLVM_ABI explicit BinaryStreamRef(ArrayRef<uint8_t> Data, llvm::endianness Endian);
166+
std::optional<uint64_t> Length);
167+
LLVM_ABI explicit BinaryStreamRef(ArrayRef<uint8_t> Data,
168+
llvm::endianness Endian);
168169
LLVM_ABI explicit BinaryStreamRef(StringRef Data, llvm::endianness Endian);
169170

170171
BinaryStreamRef(const BinaryStreamRef &Other) = default;
@@ -183,15 +184,15 @@ class BinaryStreamRef
183184
/// bounds of this BinaryStreamRef's view and the implementation could read
184185
/// the data, and an appropriate error code otherwise.
185186
LLVM_ABI Error readBytes(uint64_t Offset, uint64_t Size,
186-
ArrayRef<uint8_t> &Buffer) const;
187+
ArrayRef<uint8_t> &Buffer) const;
187188

188189
/// Given an Offset into this BinaryStreamRef, return a reference to the
189190
/// largest buffer the stream could support without necessitating a copy.
190191
///
191192
/// \returns a success error code if implementation could read the data,
192193
/// and an appropriate error code otherwise.
193194
LLVM_ABI Error readLongestContiguousChunk(uint64_t Offset,
194-
ArrayRef<uint8_t> &Buffer) const;
195+
ArrayRef<uint8_t> &Buffer) const;
195196
};
196197

197198
struct BinarySubstreamRef {
@@ -235,10 +236,11 @@ class WritableBinaryStreamRef
235236
public:
236237
WritableBinaryStreamRef() = default;
237238
LLVM_ABI WritableBinaryStreamRef(WritableBinaryStream &Stream);
238-
LLVM_ABI WritableBinaryStreamRef(WritableBinaryStream &Stream, uint64_t Offset,
239-
std::optional<uint64_t> Length);
239+
LLVM_ABI WritableBinaryStreamRef(WritableBinaryStream &Stream,
240+
uint64_t Offset,
241+
std::optional<uint64_t> Length);
240242
LLVM_ABI explicit WritableBinaryStreamRef(MutableArrayRef<uint8_t> Data,
241-
llvm::endianness Endian);
243+
llvm::endianness Endian);
242244
WritableBinaryStreamRef(const WritableBinaryStreamRef &Other) = default;
243245
WritableBinaryStreamRef &
244246
operator=(const WritableBinaryStreamRef &Other) = default;

llvm/include/llvm/Support/BinaryStreamWriter.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#ifndef LLVM_SUPPORT_BINARYSTREAMWRITER_H
1010
#define LLVM_SUPPORT_BINARYSTREAMWRITER_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/ArrayRef.h"
1413
#include "llvm/ADT/StringRef.h"
1514
#include "llvm/Support/BinaryStreamArray.h"
1615
#include "llvm/Support/BinaryStreamError.h"
1716
#include "llvm/Support/BinaryStreamRef.h"
17+
#include "llvm/Support/Compiler.h"
1818
#include "llvm/Support/Endian.h"
1919
#include "llvm/Support/Error.h"
2020
#include <cstdint>
@@ -34,7 +34,7 @@ class BinaryStreamWriter {
3434
LLVM_ABI explicit BinaryStreamWriter(WritableBinaryStreamRef Ref);
3535
LLVM_ABI explicit BinaryStreamWriter(WritableBinaryStream &Stream);
3636
LLVM_ABI explicit BinaryStreamWriter(MutableArrayRef<uint8_t> Data,
37-
llvm::endianness Endian);
37+
llvm::endianness Endian);
3838

3939
BinaryStreamWriter(const BinaryStreamWriter &Other) = default;
4040

@@ -172,7 +172,8 @@ class BinaryStreamWriter {
172172
}
173173

174174
/// Splits the Writer into two Writers at a given offset.
175-
LLVM_ABI std::pair<BinaryStreamWriter, BinaryStreamWriter> split(uint64_t Off) const;
175+
LLVM_ABI std::pair<BinaryStreamWriter, BinaryStreamWriter>
176+
split(uint64_t Off) const;
176177

177178
void setOffset(uint64_t Off) { Offset = Off; }
178179
uint64_t getOffset() const { return Offset; }

llvm/include/llvm/Support/BlockFrequency.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class BlockFrequency {
122122
};
123123

124124
LLVM_ABI void printRelativeBlockFreq(raw_ostream &OS, BlockFrequency EntryFreq,
125-
BlockFrequency Freq);
125+
BlockFrequency Freq);
126126

127127
} // namespace llvm
128128

llvm/include/llvm/Support/BranchProbability.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#ifndef LLVM_SUPPORT_BRANCHPROBABILITY_H
1414
#define LLVM_SUPPORT_BRANCHPROBABILITY_H
1515

16-
#include "llvm/Support/Compiler.h"
1716
#include "llvm/ADT/ADL.h"
17+
#include "llvm/Support/Compiler.h"
1818
#include "llvm/Support/DataTypes.h"
1919
#include <algorithm>
2020
#include <cassert>
@@ -56,7 +56,7 @@ class BranchProbability {
5656
static BranchProbability getRaw(uint32_t N) { return BranchProbability(N); }
5757
// Create a BranchProbability object from 64-bit integers.
5858
LLVM_ABI static BranchProbability getBranchProbability(uint64_t Numerator,
59-
uint64_t Denominator);
59+
uint64_t Denominator);
6060

6161
// Normalize given probabilties so that the sum of them becomes approximate
6262
// one.

llvm/include/llvm/Support/COM.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ enum class COMThreadingMode { SingleThreaded, MultiThreaded };
2222
class InitializeCOMRAII {
2323
public:
2424
LLVM_ABI explicit InitializeCOMRAII(COMThreadingMode Threading,
25-
bool SpeedOverMemory = false);
25+
bool SpeedOverMemory = false);
2626
LLVM_ABI ~InitializeCOMRAII();
2727

2828
private:

llvm/include/llvm/Support/CSKYAttributeParser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef LLVM_SUPPORT_CSKYATTRIBUTEPARSER_H
1010
#define LLVM_SUPPORT_CSKYATTRIBUTEPARSER_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/Support/CSKYAttributes.h"
13+
#include "llvm/Support/Compiler.h"
1414
#include "llvm/Support/ELFAttrParserCompact.h"
1515

1616
namespace llvm {

llvm/include/llvm/Support/CachePruning.h

+5-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ struct CachePruningPolicy {
6767
/// For example: "prune_interval=30s:prune_after=24h:cache_size=50%"
6868
/// which means a pruning interval of 30 seconds, expiration time of 24 hours
6969
/// and maximum cache size of 50% of available disk space.
70-
LLVM_ABI Expected<CachePruningPolicy> parseCachePruningPolicy(StringRef PolicyStr);
70+
LLVM_ABI Expected<CachePruningPolicy>
71+
parseCachePruningPolicy(StringRef PolicyStr);
7172

7273
/// Peform pruning using the supplied policy, returns true if pruning
7374
/// occurred, i.e. if Policy.Interval was expired.
@@ -80,8 +81,9 @@ LLVM_ABI Expected<CachePruningPolicy> parseCachePruningPolicy(StringRef PolicySt
8081
/// As a safeguard against data loss if the user specifies the wrong directory
8182
/// as their cache directory, this function will ignore files not matching the
8283
/// pattern "llvmcache-*".
83-
LLVM_ABI bool pruneCache(StringRef Path, CachePruningPolicy Policy,
84-
const std::vector<std::unique_ptr<MemoryBuffer>> &Files = {});
84+
LLVM_ABI bool
85+
pruneCache(StringRef Path, CachePruningPolicy Policy,
86+
const std::vector<std::unique_ptr<MemoryBuffer>> &Files = {});
8587
} // namespace llvm
8688

8789
#endif

llvm/include/llvm/Support/Chrono.h

+20-8
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,36 @@ LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, sys::UtcTime<> TP);
9191
template <>
9292
struct format_provider<sys::TimePoint<>> {
9393
LLVM_ABI static void format(const sys::TimePoint<> &TP, llvm::raw_ostream &OS,
94-
StringRef Style);
94+
StringRef Style);
9595
};
9696

9797
template <> struct format_provider<sys::UtcTime<std::chrono::seconds>> {
9898
LLVM_ABI static void format(const sys::UtcTime<std::chrono::seconds> &TP,
99-
llvm::raw_ostream &OS, StringRef Style);
99+
llvm::raw_ostream &OS, StringRef Style);
100100
};
101101

102102
namespace detail {
103103
template <typename Period> struct unit { static const char value[]; };
104104
template <typename Period> const char unit<Period>::value[] = "";
105105

106-
template <> struct unit<std::ratio<3600>> { LLVM_ABI static const char value[]; };
107-
template <> struct unit<std::ratio<60>> { LLVM_ABI static const char value[]; };
108-
template <> struct unit<std::ratio<1>> { LLVM_ABI static const char value[]; };
109-
template <> struct unit<std::milli> { LLVM_ABI static const char value[]; };
110-
template <> struct unit<std::micro> { LLVM_ABI static const char value[]; };
111-
template <> struct unit<std::nano> { LLVM_ABI static const char value[]; };
106+
template <> struct unit<std::ratio<3600>> {
107+
LLVM_ABI static const char value[];
108+
};
109+
template <> struct unit<std::ratio<60>> {
110+
LLVM_ABI static const char value[];
111+
};
112+
template <> struct unit<std::ratio<1>> {
113+
LLVM_ABI static const char value[];
114+
};
115+
template <> struct unit<std::milli> {
116+
LLVM_ABI static const char value[];
117+
};
118+
template <> struct unit<std::micro> {
119+
LLVM_ABI static const char value[];
120+
};
121+
template <> struct unit<std::nano> {
122+
LLVM_ABI static const char value[];
123+
};
112124
} // namespace detail
113125

114126
/// Implementation of format_provider<T> for duration types.

0 commit comments

Comments
 (0)