Skip to content

Commit 39ade94

Browse files
committed
Reformat changes
1 parent 26aa1fb commit 39ade94

Some content is hidden

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

43 files changed

+671
-602
lines changed

llvm/include/llvm/Support/ARMWinEH.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Lines changed: 3 additions & 2 deletions
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/Atomic.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@
2727

2828
namespace llvm {
2929
namespace sys {
30-
LLVM_ABI void MemoryFence();
30+
LLVM_ABI void MemoryFence();
3131

3232
#ifdef _MSC_VER
33-
typedef long cas_flag;
33+
typedef long cas_flag;
3434
#else
35-
typedef uint32_t cas_flag;
35+
typedef uint32_t cas_flag;
3636
#endif
37-
LLVM_ABI cas_flag CompareAndSwap(volatile cas_flag* ptr,
38-
cas_flag new_value,
39-
cas_flag old_value);
37+
LLVM_ABI cas_flag CompareAndSwap(volatile cas_flag *ptr, cas_flag new_value,
38+
cas_flag old_value);
4039
}
4140
}
4241

llvm/include/llvm/Support/Base64.h

Lines changed: 2 additions & 1 deletion
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/BlockFrequency.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class LLVM_ABI 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/CachePruning.h

Lines changed: 5 additions & 3 deletions
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

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, sys::UtcTime<> TP);
8888
/// - %N is nanos: 000000000 - 999999999
8989
///
9090
/// If no options are given, the default format is "%Y-%m-%d %H:%M:%S.%N".
91-
template <>
92-
struct LLVM_ABI format_provider<sys::TimePoint<>> {
91+
template <> struct LLVM_ABI format_provider<sys::TimePoint<>> {
9392
static void format(const sys::TimePoint<> &TP, llvm::raw_ostream &OS,
9493
StringRef Style);
9594
};
9695

97-
template <> struct LLVM_ABI format_provider<sys::UtcTime<std::chrono::seconds>> {
96+
template <>
97+
struct LLVM_ABI format_provider<sys::UtcTime<std::chrono::seconds>> {
9898
static void format(const sys::UtcTime<std::chrono::seconds> &TP,
9999
llvm::raw_ostream &OS, StringRef Style);
100100
};
@@ -103,12 +103,24 @@ 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 LLVM_ABI unit<std::ratio<3600>> { static const char value[]; };
107-
template <> struct LLVM_ABI unit<std::ratio<60>> { static const char value[]; };
108-
template <> struct LLVM_ABI unit<std::ratio<1>> { static const char value[]; };
109-
template <> struct LLVM_ABI unit<std::milli> { static const char value[]; };
110-
template <> struct LLVM_ABI unit<std::micro> { static const char value[]; };
111-
template <> struct LLVM_ABI unit<std::nano> { static const char value[]; };
106+
template <> struct LLVM_ABI unit<std::ratio<3600>> {
107+
static const char value[];
108+
};
109+
template <> struct LLVM_ABI unit<std::ratio<60>> {
110+
static const char value[];
111+
};
112+
template <> struct LLVM_ABI unit<std::ratio<1>> {
113+
static const char value[];
114+
};
115+
template <> struct LLVM_ABI unit<std::milli> {
116+
static const char value[];
117+
};
118+
template <> struct LLVM_ABI unit<std::micro> {
119+
static const char value[];
120+
};
121+
template <> struct LLVM_ABI unit<std::nano> {
122+
static const char value[];
123+
};
112124
} // namespace detail
113125

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

llvm/include/llvm/Support/CommandLine.h

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ namespace cl {
6767
// that give precedence to earlier occurrences, you will need to extend this
6868
// function to support it correctly.
6969
LLVM_ABI bool ParseCommandLineOptions(int argc, const char *const *argv,
70-
StringRef Overview = "",
71-
raw_ostream *Errs = nullptr,
72-
const char *EnvVar = nullptr,
73-
bool LongOptionsUseDoubleDash = false);
70+
StringRef Overview = "",
71+
raw_ostream *Errs = nullptr,
72+
const char *EnvVar = nullptr,
73+
bool LongOptionsUseDoubleDash = false);
7474

7575
// Function pointer type for printing version information.
7676
using VersionPrinterTy = std::function<void(raw_ostream &)>;
@@ -891,7 +891,8 @@ template <class DataType> class parser : public generic_parser_base {
891891
//--------------------------------------------------
892892
// Super class of parsers to provide boilerplate code
893893
//
894-
class LLVM_ABI basic_parser_impl { // non-template implementation of basic_parser<t>
894+
class LLVM_ABI
895+
basic_parser_impl { // non-template implementation of basic_parser<t>
895896
public:
896897
basic_parser_impl(Option &) {}
897898

@@ -969,7 +970,8 @@ template <> class LLVM_ABI parser<bool> : public basic_parser<bool> {
969970

970971
extern template class LLVM_TEMPLATE_ABI basic_parser<boolOrDefault>;
971972

972-
template <> class LLVM_ABI parser<boolOrDefault> : public basic_parser<boolOrDefault> {
973+
template <>
974+
class LLVM_ABI parser<boolOrDefault> : public basic_parser<boolOrDefault> {
973975
public:
974976
parser(Option &O) : basic_parser(O) {}
975977

@@ -1079,7 +1081,8 @@ template <> class LLVM_ABI parser<unsigned> : public basic_parser<unsigned> {
10791081
extern template class LLVM_TEMPLATE_ABI basic_parser<unsigned long>;
10801082

10811083
template <>
1082-
class LLVM_ABI parser<unsigned long> final : public basic_parser<unsigned long> {
1084+
class LLVM_ABI parser<unsigned long> final
1085+
: public basic_parser<unsigned long> {
10831086
public:
10841087
parser(Option &O) : basic_parser(O) {}
10851088

@@ -1101,7 +1104,8 @@ class LLVM_ABI parser<unsigned long> final : public basic_parser<unsigned long>
11011104
extern template class LLVM_TEMPLATE_ABI basic_parser<unsigned long long>;
11021105

11031106
template <>
1104-
class LLVM_ABI parser<unsigned long long> : public basic_parser<unsigned long long> {
1107+
class LLVM_ABI parser<unsigned long long>
1108+
: public basic_parser<unsigned long long> {
11051109
public:
11061110
parser(Option &O) : basic_parser(O) {}
11071111

@@ -1165,7 +1169,8 @@ template <> class LLVM_ABI parser<float> : public basic_parser<float> {
11651169

11661170
extern template class LLVM_TEMPLATE_ABI basic_parser<std::string>;
11671171

1168-
template <> class LLVM_ABI parser<std::string> : public basic_parser<std::string> {
1172+
template <>
1173+
class LLVM_ABI parser<std::string> : public basic_parser<std::string> {
11691174
public:
11701175
parser(Option &O) : basic_parser(O) {}
11711176

@@ -2079,8 +2084,8 @@ getRegisteredSubcommands();
20792084
/// lines and end of the response file to be marked with a nullptr string.
20802085
/// \param [out] NewArgv All parsed strings are appended to NewArgv.
20812086
LLVM_ABI void TokenizeGNUCommandLine(StringRef Source, StringSaver &Saver,
2082-
SmallVectorImpl<const char *> &NewArgv,
2083-
bool MarkEOLs = false);
2087+
SmallVectorImpl<const char *> &NewArgv,
2088+
bool MarkEOLs = false);
20842089

20852090
/// Tokenizes a string of Windows command line arguments, which may contain
20862091
/// quotes and escaped quotes.
@@ -2097,15 +2102,16 @@ LLVM_ABI void TokenizeGNUCommandLine(StringRef Source, StringSaver &Saver,
20972102
/// lines and end of the response file to be marked with a nullptr string.
20982103
/// \param [out] NewArgv All parsed strings are appended to NewArgv.
20992104
LLVM_ABI void TokenizeWindowsCommandLine(StringRef Source, StringSaver &Saver,
2100-
SmallVectorImpl<const char *> &NewArgv,
2101-
bool MarkEOLs = false);
2105+
SmallVectorImpl<const char *> &NewArgv,
2106+
bool MarkEOLs = false);
21022107

21032108
/// Tokenizes a Windows command line while attempting to avoid copies. If no
21042109
/// quoting or escaping was used, this produces substrings of the original
21052110
/// string. If a token requires unquoting, it will be allocated with the
21062111
/// StringSaver.
2107-
LLVM_ABI void TokenizeWindowsCommandLineNoCopy(StringRef Source, StringSaver &Saver,
2108-
SmallVectorImpl<StringRef> &NewArgv);
2112+
LLVM_ABI void
2113+
TokenizeWindowsCommandLineNoCopy(StringRef Source, StringSaver &Saver,
2114+
SmallVectorImpl<StringRef> &NewArgv);
21092115

21102116
/// Tokenizes a Windows full command line, including command name at the start.
21112117
///
@@ -2120,9 +2126,10 @@ LLVM_ABI void TokenizeWindowsCommandLineNoCopy(StringRef Source, StringSaver &Sa
21202126
/// if you set MarkEOLs = true, then the first word of every line will be
21212127
/// parsed using the special rules for command names, making this function
21222128
/// suitable for parsing a file full of commands to execute.
2123-
LLVM_ABI void TokenizeWindowsCommandLineFull(StringRef Source, StringSaver &Saver,
2124-
SmallVectorImpl<const char *> &NewArgv,
2125-
bool MarkEOLs = false);
2129+
LLVM_ABI void
2130+
TokenizeWindowsCommandLineFull(StringRef Source, StringSaver &Saver,
2131+
SmallVectorImpl<const char *> &NewArgv,
2132+
bool MarkEOLs = false);
21262133

21272134
/// String tokenization function type. Should be compatible with either
21282135
/// Windows or Unix command line tokenizers.
@@ -2140,8 +2147,8 @@ using TokenizerCallback = void (*)(StringRef Source, StringSaver &Saver,
21402147
/// It works like TokenizeGNUCommandLine with ability to skip comment lines.
21412148
///
21422149
LLVM_ABI void tokenizeConfigFile(StringRef Source, StringSaver &Saver,
2143-
SmallVectorImpl<const char *> &NewArgv,
2144-
bool MarkEOLs = false);
2150+
SmallVectorImpl<const char *> &NewArgv,
2151+
bool MarkEOLs = false);
21452152

21462153
/// Contains options that control response file expansion.
21472154
class LLVM_ABI ExpansionContext {
@@ -2234,21 +2241,23 @@ class LLVM_ABI ExpansionContext {
22342241
/// environment variable EnvVar and command line options, then expands
22352242
/// response files recursively.
22362243
/// \return true if all @files were expanded successfully or there were none.
2237-
LLVM_ABI bool expandResponseFiles(int Argc, const char *const *Argv, const char *EnvVar,
2238-
SmallVectorImpl<const char *> &NewArgv);
2244+
LLVM_ABI bool expandResponseFiles(int Argc, const char *const *Argv,
2245+
const char *EnvVar,
2246+
SmallVectorImpl<const char *> &NewArgv);
22392247

22402248
/// A convenience helper which supports the typical use case of expansion
22412249
/// function call.
2242-
LLVM_ABI bool ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer,
2243-
SmallVectorImpl<const char *> &Argv);
2250+
LLVM_ABI bool ExpandResponseFiles(StringSaver &Saver,
2251+
TokenizerCallback Tokenizer,
2252+
SmallVectorImpl<const char *> &Argv);
22442253

22452254
/// A convenience helper which concatenates the options specified by the
22462255
/// environment variable EnvVar and command line options, then expands response
22472256
/// files recursively. The tokenizer is a predefined GNU or Windows one.
22482257
/// \return true if all @files were expanded successfully or there were none.
2249-
LLVM_ABI bool expandResponseFiles(int Argc, const char *const *Argv, const char *EnvVar,
2250-
StringSaver &Saver,
2251-
SmallVectorImpl<const char *> &NewArgv);
2258+
LLVM_ABI bool expandResponseFiles(int Argc, const char *const *Argv,
2259+
const char *EnvVar, StringSaver &Saver,
2260+
SmallVectorImpl<const char *> &NewArgv);
22522261

22532262
/// Mark all options not part of this category as cl::ReallyHidden.
22542263
///
@@ -2258,7 +2267,7 @@ LLVM_ABI bool expandResponseFiles(int Argc, const char *const *Argv, const char
22582267
/// not specific to the tool. This function allows a tool to specify a single
22592268
/// option category to display in the -help output.
22602269
LLVM_ABI void HideUnrelatedOptions(cl::OptionCategory &Category,
2261-
SubCommand &Sub = SubCommand::getTopLevel());
2270+
SubCommand &Sub = SubCommand::getTopLevel());
22622271

22632272
/// Mark all options not part of the categories as cl::ReallyHidden.
22642273
///
@@ -2267,8 +2276,9 @@ LLVM_ABI void HideUnrelatedOptions(cl::OptionCategory &Category,
22672276
/// Some tools (like clang-format) like to be able to hide all options that are
22682277
/// not specific to the tool. This function allows a tool to specify a single
22692278
/// option category to display in the -help output.
2270-
LLVM_ABI void HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories,
2271-
SubCommand &Sub = SubCommand::getTopLevel());
2279+
LLVM_ABI void
2280+
HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories,
2281+
SubCommand &Sub = SubCommand::getTopLevel());
22722282

22732283
/// Reset all command line options to a state that looks as if they have
22742284
/// never appeared on the command line. This is useful for being able to parse

llvm/include/llvm/Support/Compression.h

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,15 @@ constexpr int BestSizeCompression = 9;
4242
LLVM_ABI bool isAvailable();
4343

4444
LLVM_ABI void compress(ArrayRef<uint8_t> Input,
45-
SmallVectorImpl<uint8_t> &CompressedBuffer,
46-
int Level = DefaultCompression);
45+
SmallVectorImpl<uint8_t> &CompressedBuffer,
46+
int Level = DefaultCompression);
4747

4848
LLVM_ABI Error decompress(ArrayRef<uint8_t> Input, uint8_t *Output,
49-
size_t &UncompressedSize);
49+
size_t &UncompressedSize);
5050

51-
LLVM_ABI Error decompress(ArrayRef<uint8_t> Input, SmallVectorImpl<uint8_t> &Output,
52-
size_t UncompressedSize);
51+
LLVM_ABI Error decompress(ArrayRef<uint8_t> Input,
52+
SmallVectorImpl<uint8_t> &Output,
53+
size_t UncompressedSize);
5354

5455
} // End of namespace zlib
5556

@@ -63,14 +64,15 @@ constexpr int BestSizeCompression = 12;
6364
LLVM_ABI bool isAvailable();
6465

6566
LLVM_ABI void compress(ArrayRef<uint8_t> Input,
66-
SmallVectorImpl<uint8_t> &CompressedBuffer,
67-
int Level = DefaultCompression, bool EnableLdm = false);
67+
SmallVectorImpl<uint8_t> &CompressedBuffer,
68+
int Level = DefaultCompression, bool EnableLdm = false);
6869

6970
LLVM_ABI Error decompress(ArrayRef<uint8_t> Input, uint8_t *Output,
70-
size_t &UncompressedSize);
71+
size_t &UncompressedSize);
7172

72-
LLVM_ABI Error decompress(ArrayRef<uint8_t> Input, SmallVectorImpl<uint8_t> &Output,
73-
size_t UncompressedSize);
73+
LLVM_ABI Error decompress(ArrayRef<uint8_t> Input,
74+
SmallVectorImpl<uint8_t> &Output,
75+
size_t UncompressedSize);
7476

7577
} // End of namespace zstd
7678

@@ -115,15 +117,17 @@ LLVM_ABI const char *getReasonIfUnsupported(Format F);
115117
// Compress Input with the specified format P.Format. If Level is -1, use
116118
// *::DefaultCompression for the format.
117119
LLVM_ABI void compress(Params P, ArrayRef<uint8_t> Input,
118-
SmallVectorImpl<uint8_t> &Output);
120+
SmallVectorImpl<uint8_t> &Output);
119121

120122
// Decompress Input. The uncompressed size must be available.
121123
LLVM_ABI Error decompress(DebugCompressionType T, ArrayRef<uint8_t> Input,
122-
uint8_t *Output, size_t UncompressedSize);
124+
uint8_t *Output, size_t UncompressedSize);
123125
LLVM_ABI Error decompress(Format F, ArrayRef<uint8_t> Input,
124-
SmallVectorImpl<uint8_t> &Output, size_t UncompressedSize);
126+
SmallVectorImpl<uint8_t> &Output,
127+
size_t UncompressedSize);
125128
LLVM_ABI Error decompress(DebugCompressionType T, ArrayRef<uint8_t> Input,
126-
SmallVectorImpl<uint8_t> &Output, size_t UncompressedSize);
129+
SmallVectorImpl<uint8_t> &Output,
130+
size_t UncompressedSize);
127131

128132
} // End of namespace compression
129133

llvm/include/llvm/Support/ConvertEBCDIC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
namespace llvm {
2222
namespace ConverterEBCDIC {
2323
LLVM_ABI std::error_code convertToEBCDIC(StringRef Source,
24-
SmallVectorImpl<char> &Result);
24+
SmallVectorImpl<char> &Result);
2525

2626
LLVM_ABI void convertToUTF8(StringRef Source, SmallVectorImpl<char> &Result);
2727

0 commit comments

Comments
 (0)