Skip to content

Commit 7e376f5

Browse files
committed
[llvm] clang-format changes to TextAPI library
1 parent d16fc30 commit 7e376f5

File tree

12 files changed

+71
-54
lines changed

12 files changed

+71
-54
lines changed

llvm/include/llvm-c/Error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#ifndef LLVM_C_ERROR_H
1515
#define LLVM_C_ERROR_H
1616

17-
#include "llvm/Support/Compiler.h"
1817
#include "llvm-c/ExternC.h"
18+
#include "llvm/Support/Compiler.h"
1919

2020
LLVM_C_EXTERN_C_BEGIN
2121

llvm/include/llvm/TargetParser/Triple.h

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef LLVM_TARGETPARSER_TRIPLE_H
1010
#define LLVM_TARGETPARSER_TRIPLE_H
1111

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

1616
// Some system headers or GCC predefined macros conflict with identifiers in
@@ -350,9 +350,10 @@ class Triple {
350350
Triple() = default;
351351

352352
LLVM_ABI explicit Triple(const Twine &Str);
353-
LLVM_ABI Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr);
354-
LLVM_ABI Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr,
355-
const Twine &EnvironmentStr);
353+
LLVM_ABI Triple(const Twine &ArchStr, const Twine &VendorStr,
354+
const Twine &OSStr);
355+
LLVM_ABI Triple(const Twine &ArchStr, const Twine &VendorStr,
356+
const Twine &OSStr, const Twine &EnvironmentStr);
356357

357358
bool operator==(const Triple &Other) const {
358359
return Arch == Other.Arch && SubArch == Other.SubArch &&
@@ -382,8 +383,8 @@ class Triple {
382383
/// reasonably be done). In particular, it handles the common case in which
383384
/// otherwise valid components are in the wrong order. \p Form is used to
384385
/// specify the output canonical form.
385-
LLVM_ABI static std::string normalize(StringRef Str,
386-
CanonicalForm Form = CanonicalForm::ANY);
386+
LLVM_ABI static std::string
387+
normalize(StringRef Str, CanonicalForm Form = CanonicalForm::ANY);
387388

388389
/// Return the normalized form of this triple's string.
389390
std::string normalize(CanonicalForm Form = CanonicalForm::ANY) const {
@@ -546,7 +547,7 @@ class Triple {
546547
/// Comparison function for checking OS X version compatibility, which handles
547548
/// supporting skewed version numbering schemes used by the "darwin" triples.
548549
LLVM_ABI bool isMacOSXVersionLT(unsigned Major, unsigned Minor = 0,
549-
unsigned Micro = 0) const;
550+
unsigned Micro = 0) const;
550551

551552
/// Is this a Mac OS X triple. For legacy reasons, we support both "darwin"
552553
/// and "osx" as OS X triples.
@@ -1241,7 +1242,8 @@ class Triple {
12411242
LLVM_ABI static StringRef getArchTypeName(ArchType Kind);
12421243

12431244
/// Get the architecture name based on \p Kind and \p SubArch.
1244-
LLVM_ABI static StringRef getArchName(ArchType Kind, SubArchType SubArch = NoSubArch);
1245+
LLVM_ABI static StringRef getArchName(ArchType Kind,
1246+
SubArchType SubArch = NoSubArch);
12451247

12461248
/// Get the "prefix" canonical name for the \p Kind architecture. This is the
12471249
/// prefix used by the architecture specific builtins, and is suitable for
@@ -1260,7 +1262,8 @@ class Triple {
12601262
LLVM_ABI static StringRef getEnvironmentTypeName(EnvironmentType Kind);
12611263

12621264
/// Get the name for the \p Object format.
1263-
LLVM_ABI static StringRef getObjectFormatTypeName(ObjectFormatType ObjectFormat);
1265+
LLVM_ABI static StringRef
1266+
getObjectFormatTypeName(ObjectFormatType ObjectFormat);
12641267

12651268
/// @}
12661269
/// @name Static helpers for converting alternate architecture names.
@@ -1272,8 +1275,8 @@ class Triple {
12721275
/// @}
12731276

12741277
/// Returns a canonicalized OS version number for the specified OS.
1275-
LLVM_ABI static VersionTuple getCanonicalVersionForOS(OSType OSKind,
1276-
const VersionTuple &Version);
1278+
LLVM_ABI static VersionTuple
1279+
getCanonicalVersionForOS(OSType OSKind, const VersionTuple &Version);
12771280
};
12781281

12791282
} // End llvm namespace

llvm/include/llvm/TextAPI/Architecture.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ enum Architecture : uint8_t {
3333
};
3434

3535
/// Convert a CPU Type and Subtype pair to an architecture slice.
36-
LLVM_ABI Architecture getArchitectureFromCpuType(uint32_t CPUType, uint32_t CPUSubType);
36+
LLVM_ABI Architecture getArchitectureFromCpuType(uint32_t CPUType,
37+
uint32_t CPUSubType);
3738

3839
/// Convert a name to an architecture slice.
3940
LLVM_ABI Architecture getArchitectureFromName(StringRef Name);
@@ -42,7 +43,8 @@ LLVM_ABI Architecture getArchitectureFromName(StringRef Name);
4243
LLVM_ABI StringRef getArchitectureName(Architecture Arch);
4344

4445
/// Convert an architecture slice to a CPU Type and Subtype pair.
45-
LLVM_ABI std::pair<uint32_t, uint32_t> getCPUTypeFromArchitecture(Architecture Arch);
46+
LLVM_ABI std::pair<uint32_t, uint32_t>
47+
getCPUTypeFromArchitecture(Architecture Arch);
4648

4749
/// Convert a target to an architecture slice.
4850
LLVM_ABI Architecture mapToArchitecture(const llvm::Triple &Target);

llvm/include/llvm/TextAPI/DylibReader.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#ifndef LLVM_TEXTAPI_DYLIBREADER_H
1414
#define LLVM_TEXTAPI_DYLIBREADER_H
1515

16-
#include "llvm/Support/Compiler.h"
1716
#include "llvm/ADT/StringMap.h"
17+
#include "llvm/Support/Compiler.h"
1818
#include "llvm/Support/Error.h"
1919
#include "llvm/Support/MemoryBuffer.h"
2020
#include "llvm/TextAPI/ArchitectureSet.h"
@@ -38,7 +38,8 @@ struct ParseOption {
3838
/// \param Buffer Data that points to dylib.
3939
/// \param Options Determines which attributes to extract.
4040
/// \return List of record slices.
41-
LLVM_ABI Expected<Records> readFile(MemoryBufferRef Buffer, const ParseOption &Opt);
41+
LLVM_ABI Expected<Records> readFile(MemoryBufferRef Buffer,
42+
const ParseOption &Opt);
4243

4344
/// Get TAPI file representation of binary dylib.
4445
///
@@ -51,7 +52,7 @@ using SymbolToSourceLocMap = llvm::StringMap<RecordLoc>;
5152
/// \param DSYM Path to DSYM file.
5253
/// \param T Requested target slice for dylib.
5354
LLVM_ABI SymbolToSourceLocMap accumulateSourceLocFromDSYM(const StringRef DSYM,
54-
const Target &T);
55+
const Target &T);
5556

5657
} // namespace llvm::MachO::DylibReader
5758

llvm/include/llvm/TextAPI/InterfaceFile.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#ifndef LLVM_TEXTAPI_INTERFACEFILE_H
1515
#define LLVM_TEXTAPI_INTERFACEFILE_H
1616

17-
#include "llvm/Support/Compiler.h"
1817
#include "llvm/ADT/Hashing.h"
1918
#include "llvm/ADT/StringRef.h"
2019
#include "llvm/ADT/iterator.h"
2120
#include "llvm/Support/Allocator.h"
21+
#include "llvm/Support/Compiler.h"
2222
#include "llvm/TextAPI/ArchitectureSet.h"
2323
#include "llvm/TextAPI/FileTypes.h"
2424
#include "llvm/TextAPI/PackedVersion.h"
@@ -275,7 +275,8 @@ class InterfaceFile {
275275
///
276276
/// \param InstallName The name of the library to re-export.
277277
/// \param Target The target triple for which this applies.
278-
LLVM_ABI void addReexportedLibrary(StringRef InstallName, const Target &Target);
278+
LLVM_ABI void addReexportedLibrary(StringRef InstallName,
279+
const Target &Target);
279280

280281
/// Get the list of re-exported libraries.
281282
///
@@ -399,15 +400,15 @@ class InterfaceFile {
399400
/// \param Library Interface of reexported library.
400401
/// \param Overwrite Whether to overwrite preexisting inlined library.
401402
LLVM_ABI void inlineLibrary(std::shared_ptr<InterfaceFile> Library,
402-
bool Overwrite = false);
403+
bool Overwrite = false);
403404

404405
/// Set InterfaceFile properties from pre-gathered binary attributes,
405406
/// if they are not set already.
406407
///
407408
/// \param BA Attributes typically represented in load commands.
408409
/// \param Targ MachO Target slice to add attributes to.
409410
LLVM_ABI void setFromBinaryAttrs(const RecordsSlice::BinaryAttrs &BA,
410-
const Target &Targ);
411+
const Target &Targ);
411412

412413
/// The equality is determined by attributes that impact linking
413414
/// compatibilities. Path, & FileKind are irrelevant since these by

llvm/include/llvm/TextAPI/Platform.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#ifndef LLVM_TEXTAPI_PLATFORM_H
1313
#define LLVM_TEXTAPI_PLATFORM_H
1414

15-
#include "llvm/Support/Compiler.h"
1615
#include "llvm/ADT/SmallSet.h"
1716
#include "llvm/BinaryFormat/MachO.h"
17+
#include "llvm/Support/Compiler.h"
1818
#include "llvm/Support/VersionTuple.h"
1919

2020
namespace llvm {
@@ -29,7 +29,7 @@ LLVM_ABI PlatformSet mapToPlatformSet(ArrayRef<Triple> Targets);
2929
LLVM_ABI StringRef getPlatformName(PlatformType Platform);
3030
LLVM_ABI PlatformType getPlatformFromName(StringRef Name);
3131
LLVM_ABI std::string getOSAndEnvironmentName(PlatformType Platform,
32-
std::string Version = "");
32+
std::string Version = "");
3333
LLVM_ABI VersionTuple mapToSupportedOSVersion(const Triple &Triple);
3434

3535
} // end namespace MachO.

llvm/include/llvm/TextAPI/Record.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#ifndef LLVM_TEXTAPI_RECORD_H
1515
#define LLVM_TEXTAPI_RECORD_H
1616

17-
#include "llvm/Support/Compiler.h"
1817
#include "llvm/ADT/MapVector.h"
1918
#include "llvm/ADT/StringRef.h"
2019
#include "llvm/Support/Casting.h"
20+
#include "llvm/Support/Compiler.h"
2121
#include "llvm/TextAPI/Symbol.h"
2222
#include <string>
2323

@@ -209,7 +209,8 @@ class ObjCInterfaceRecord : public ObjCContainerRecord {
209209
}
210210

211211
LLVM_ABI RecordLinkage getLinkageForSymbol(ObjCIFSymbolKind CurrType) const;
212-
LLVM_ABI void updateLinkageForSymbols(ObjCIFSymbolKind SymType, RecordLinkage Link);
212+
LLVM_ABI void updateLinkageForSymbols(ObjCIFSymbolKind SymType,
213+
RecordLinkage Link);
213214

214215
LLVM_ABI bool addObjCCategory(ObjCCategoryRecord *Record);
215216
LLVM_ABI std::vector<ObjCCategoryRecord *> getObjCCategories() const;

llvm/include/llvm/TextAPI/RecordsSlice.h

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#ifndef LLVM_TEXTAPI_RECORDSLICE_H
1515
#define LLVM_TEXTAPI_RECORDSLICE_H
1616

17-
#include "llvm/Support/Compiler.h"
1817
#include "llvm/Support/Allocator.h"
18+
#include "llvm/Support/Compiler.h"
1919
#include "llvm/TextAPI/FileTypes.h"
2020
#include "llvm/TextAPI/PackedVersion.h"
2121
#include "llvm/TextAPI/Record.h"
@@ -44,9 +44,10 @@ class RecordsSlice {
4444
/// symbol.
4545
/// \param Linkage The linkage of symbol.
4646
/// \return The non-owning pointer to added record in slice.
47-
LLVM_ABI Record *addRecord(StringRef Name, SymbolFlags Flags,
48-
GlobalRecord::Kind GV = GlobalRecord::Kind::Unknown,
49-
RecordLinkage Linkage = RecordLinkage::Unknown);
47+
LLVM_ABI Record *
48+
addRecord(StringRef Name, SymbolFlags Flags,
49+
GlobalRecord::Kind GV = GlobalRecord::Kind::Unknown,
50+
RecordLinkage Linkage = RecordLinkage::Unknown);
5051

5152
/// Add non-ObjC global record.
5253
///
@@ -58,27 +59,28 @@ class RecordsSlice {
5859
/// functions.
5960
/// \return The non-owning pointer to added record in slice.
6061
LLVM_ABI GlobalRecord *addGlobal(StringRef Name, RecordLinkage Linkage,
61-
GlobalRecord::Kind GV,
62-
SymbolFlags Flags = SymbolFlags::None,
63-
bool Inlined = false);
62+
GlobalRecord::Kind GV,
63+
SymbolFlags Flags = SymbolFlags::None,
64+
bool Inlined = false);
6465

6566
/// Add ObjC Class record.
6667
///
6768
/// \param Name The name of class, not symbol.
6869
/// \param Linkage The linkage of symbol.
6970
/// \param SymType The symbols this class represents.
7071
/// \return The non-owning pointer to added record in slice.
71-
LLVM_ABI ObjCInterfaceRecord *addObjCInterface(StringRef Name, RecordLinkage Linkage,
72-
ObjCIFSymbolKind SymType);
72+
LLVM_ABI ObjCInterfaceRecord *addObjCInterface(StringRef Name,
73+
RecordLinkage Linkage,
74+
ObjCIFSymbolKind SymType);
7375

7476
/// Add ObjC IVar record.
7577
///
7678
/// \param Container Owning pointer for instance variable.
7779
/// \param Name The name of ivar, not symbol.
7880
/// \param Linkage The linkage of symbol.
7981
/// \return The non-owning pointer to added record in slice.
80-
LLVM_ABI ObjCIVarRecord *addObjCIVar(ObjCContainerRecord *Container, StringRef Name,
81-
RecordLinkage Linkage);
82+
LLVM_ABI ObjCIVarRecord *addObjCIVar(ObjCContainerRecord *Container,
83+
StringRef Name, RecordLinkage Linkage);
8284

8385
/// Add ObjC Category record.
8486
///
@@ -87,7 +89,7 @@ class RecordsSlice {
8789
/// \param Category The name of category.
8890
/// \return The non-owning pointer to added record in slice.
8991
LLVM_ABI ObjCCategoryRecord *addObjCCategory(StringRef ClassToExtend,
90-
StringRef Category);
92+
StringRef Category);
9193

9294
/// Find ObjC Class.
9395
///
@@ -101,7 +103,7 @@ class RecordsSlice {
101103
/// \param Category The name of category.
102104
/// \return The non-owning pointer to record in slice.
103105
LLVM_ABI ObjCCategoryRecord *findObjCCategory(StringRef ClassToExtend,
104-
StringRef Category) const;
106+
StringRef Category) const;
105107

106108
/// Find ObjC Container. This is commonly used for assigning for looking up
107109
/// instance variables that are assigned to either a category or class.
@@ -111,14 +113,16 @@ class RecordsSlice {
111113
/// \param Name Either the name of ivar or name of container.
112114
/// \return The non-owning pointer to record in
113115
/// slice.
114-
LLVM_ABI ObjCContainerRecord *findContainer(bool IsIVar, StringRef Name) const;
116+
LLVM_ABI ObjCContainerRecord *findContainer(bool IsIVar,
117+
StringRef Name) const;
115118

116119
/// Find ObjC instance variable.
117120
///
118121
/// \param IsScopedName This is used to determine how to parse the name.
119122
/// \param Name Either the full name of the symbol or just the ivar.
120123
/// \return The non-owning pointer to record in slice.
121-
LLVM_ABI ObjCIVarRecord *findObjCIVar(bool IsScopedName, StringRef Name) const;
124+
LLVM_ABI ObjCIVarRecord *findObjCIVar(bool IsScopedName,
125+
StringRef Name) const;
122126

123127
/// Find non-objc global.
124128
///
@@ -197,7 +201,8 @@ class RecordsSlice {
197201

198202
using Records = llvm::SmallVector<std::shared_ptr<RecordsSlice>, 4>;
199203
class InterfaceFile;
200-
LLVM_ABI std::unique_ptr<InterfaceFile> convertToInterfaceFile(const Records &Slices);
204+
LLVM_ABI std::unique_ptr<InterfaceFile>
205+
convertToInterfaceFile(const Records &Slices);
201206

202207
} // namespace MachO
203208
} // namespace llvm

llvm/include/llvm/TextAPI/Symbol.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#ifndef LLVM_TEXTAPI_SYMBOL_H
1010
#define LLVM_TEXTAPI_SYMBOL_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/BitmaskEnum.h"
1413
#include "llvm/ADT/StringRef.h"
14+
#include "llvm/Support/Compiler.h"
1515
#include "llvm/Support/raw_ostream.h"
1616
#include "llvm/TextAPI/ArchitectureSet.h"
1717
#include "llvm/TextAPI/Target.h"
@@ -153,7 +153,8 @@ class Symbol {
153153
std::function<bool(const Target &)>>;
154154
using const_filtered_target_range =
155155
llvm::iterator_range<const_filtered_target_iterator>;
156-
LLVM_ABI const_filtered_target_range targets(ArchitectureSet architectures) const;
156+
LLVM_ABI const_filtered_target_range
157+
targets(ArchitectureSet architectures) const;
157158

158159
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
159160
void dump(raw_ostream &OS) const;

llvm/include/llvm/TextAPI/SymbolSet.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
#ifndef LLVM_TEXTAPI_SYMBOLSET_H
1010
#define LLVM_TEXTAPI_SYMBOLSET_H
1111

12-
#include "llvm/Support/Compiler.h"
1312
#include "llvm/ADT/DenseMap.h"
1413
#include "llvm/ADT/Hashing.h"
1514
#include "llvm/ADT/StringRef.h"
1615
#include "llvm/ADT/iterator.h"
1716
#include "llvm/ADT/iterator_range.h"
1817
#include "llvm/Support/Allocator.h"
18+
#include "llvm/Support/Compiler.h"
1919
#include "llvm/TextAPI/Architecture.h"
2020
#include "llvm/TextAPI/ArchitectureSet.h"
2121
#include "llvm/TextAPI/Symbol.h"
@@ -93,7 +93,7 @@ class SymbolSet {
9393
public:
9494
SymbolSet() = default;
9595
LLVM_ABI Symbol *addGlobal(EncodeKind Kind, StringRef Name, SymbolFlags Flags,
96-
const Target &Targ);
96+
const Target &Targ);
9797
size_t size() const { return Symbols.size(); }
9898

9999
template <typename RangeT, typename ElT = std::remove_reference_t<

0 commit comments

Comments
 (0)