Skip to content

Commit 71214be

Browse files
committed
clang-format
1 parent 46775c3 commit 71214be

File tree

5 files changed

+29
-32
lines changed

5 files changed

+29
-32
lines changed

llvm/include/llvm/CodeGen/TargetSubtargetInfo.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ class Triple;
6363
class TargetSubtargetInfo : public MCSubtargetInfo {
6464
protected: // Can only create subclasses...
6565
TargetSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU,
66-
StringRef FS,
67-
ArrayRef<StringRef> PN,
66+
StringRef FS, ArrayRef<StringRef> PN,
6867
ArrayRef<SubtargetFeatureKV> PF,
6968
ArrayRef<SubtargetSubTypeKV> PD,
7069
const MCWriteProcResEntry *WPR,

llvm/include/llvm/MC/MCSubtargetInfo.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ class MCSubtargetInfo {
9696
public:
9797
MCSubtargetInfo(const MCSubtargetInfo &) = default;
9898
MCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef TuneCPU,
99-
StringRef FS,
100-
ArrayRef<StringRef> PN,
99+
StringRef FS, ArrayRef<StringRef> PN,
101100
ArrayRef<SubtargetFeatureKV> PF,
102101
ArrayRef<SubtargetSubTypeKV> PD,
103102
const MCWriteProcResEntry *WPR, const MCWriteLatencyEntry *WL,

llvm/lib/CodeGen/TargetSubtargetInfo.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ using namespace llvm;
1616

1717
TargetSubtargetInfo::TargetSubtargetInfo(
1818
const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS,
19-
ArrayRef<StringRef> PN,
20-
ArrayRef<SubtargetFeatureKV> PF, ArrayRef<SubtargetSubTypeKV> PD,
21-
const MCWriteProcResEntry *WPR, const MCWriteLatencyEntry *WL,
22-
const MCReadAdvanceEntry *RA, const InstrStage *IS, const unsigned *OC,
23-
const unsigned *FP)
24-
: MCSubtargetInfo(TT, CPU, TuneCPU, FS, PN, PF, PD, WPR, WL, RA, IS, OC, FP) {}
19+
ArrayRef<StringRef> PN, ArrayRef<SubtargetFeatureKV> PF,
20+
ArrayRef<SubtargetSubTypeKV> PD, const MCWriteProcResEntry *WPR,
21+
const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA,
22+
const InstrStage *IS, const unsigned *OC, const unsigned *FP)
23+
: MCSubtargetInfo(TT, CPU, TuneCPU, FS, PN, PF, PD, WPR, WL, RA, IS, OC,
24+
FP) {}
2525

2626
TargetSubtargetInfo::~TargetSubtargetInfo() = default;
2727

llvm/lib/MC/MCSubtargetInfo.cpp

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,16 @@ static void Help(ArrayRef<StringRef> CPUNames,
110110
}
111111

112112
// Determine the length of the longest CPU and Feature entries.
113-
unsigned MaxCPULen = getLongestEntryLength(CPUNames);
113+
unsigned MaxCPULen = getLongestEntryLength(CPUNames);
114114
unsigned MaxFeatLen = getLongestEntryLength(FeatTable);
115115

116116
// Print the CPU table.
117117
errs() << "Available CPUs for this target:\n\n";
118118
for (auto &CPUName : CPUNames) {
119119
if (CPUName == "apple-latest")
120120
continue;
121-
errs() << format(" %-*s - Select the %s processor.\n", MaxCPULen, CPUName.str().c_str(),
122-
CPUName.str().c_str());
121+
errs() << format(" %-*s - Select the %s processor.\n", MaxCPULen,
122+
CPUName.str().c_str(), CPUName.str().c_str());
123123
}
124124
errs() << '\n';
125125

@@ -160,8 +160,8 @@ static void cpuHelp(ArrayRef<StringRef> CPUNames) {
160160
PrintOnce = true;
161161
}
162162

163-
static FeatureBitset getFeatures(MCSubtargetInfo &STI,
164-
StringRef CPU, StringRef TuneCPU, StringRef FS,
163+
static FeatureBitset getFeatures(MCSubtargetInfo &STI, StringRef CPU,
164+
StringRef TuneCPU, StringRef FS,
165165
ArrayRef<StringRef> ProcNames,
166166
ArrayRef<SubtargetSubTypeKV> ProcDesc,
167167
ArrayRef<SubtargetFeatureKV> ProcFeatures) {
@@ -222,7 +222,8 @@ static FeatureBitset getFeatures(MCSubtargetInfo &STI,
222222

223223
void MCSubtargetInfo::InitMCProcessorInfo(StringRef CPU, StringRef TuneCPU,
224224
StringRef FS) {
225-
FeatureBits = getFeatures(*this, CPU, TuneCPU, FS, ProcNames, ProcDesc, ProcFeatures);
225+
FeatureBits =
226+
getFeatures(*this, CPU, TuneCPU, FS, ProcNames, ProcDesc, ProcFeatures);
226227
FeatureString = std::string(FS);
227228

228229
if (!TuneCPU.empty())
@@ -233,20 +234,17 @@ void MCSubtargetInfo::InitMCProcessorInfo(StringRef CPU, StringRef TuneCPU,
233234

234235
void MCSubtargetInfo::setDefaultFeatures(StringRef CPU, StringRef TuneCPU,
235236
StringRef FS) {
236-
FeatureBits = getFeatures(*this, CPU, TuneCPU, FS, ProcNames, ProcDesc, ProcFeatures);
237+
FeatureBits =
238+
getFeatures(*this, CPU, TuneCPU, FS, ProcNames, ProcDesc, ProcFeatures);
237239
FeatureString = std::string(FS);
238240
}
239241

240-
MCSubtargetInfo::MCSubtargetInfo(const Triple &TT, StringRef C, StringRef TC,
241-
StringRef FS,
242-
ArrayRef<StringRef> PN,
243-
ArrayRef<SubtargetFeatureKV> PF,
244-
ArrayRef<SubtargetSubTypeKV> PD,
245-
const MCWriteProcResEntry *WPR,
246-
const MCWriteLatencyEntry *WL,
247-
const MCReadAdvanceEntry *RA,
248-
const InstrStage *IS, const unsigned *OC,
249-
const unsigned *FP)
242+
MCSubtargetInfo::MCSubtargetInfo(
243+
const Triple &TT, StringRef C, StringRef TC, StringRef FS,
244+
ArrayRef<StringRef> PN, ArrayRef<SubtargetFeatureKV> PF,
245+
ArrayRef<SubtargetSubTypeKV> PD, const MCWriteProcResEntry *WPR,
246+
const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA,
247+
const InstrStage *IS, const unsigned *OC, const unsigned *FP)
250248
: TargetTriple(TT), CPU(std::string(C)), TuneCPU(std::string(TC)),
251249
ProcNames(PN), ProcFeatures(PF), ProcDesc(PD), WriteProcResTable(WPR),
252250
WriteLatencyTable(WL), ReadAdvanceTable(RA), Stages(IS),

llvm/utils/TableGen/SubtargetEmitter.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include "llvm/ADT/SmallPtrSet.h"
2121
#include "llvm/ADT/StringExtras.h"
2222
#include "llvm/ADT/StringMap.h"
23-
#include "llvm/ADT/StringSwitch.h"
2423
#include "llvm/ADT/StringRef.h"
24+
#include "llvm/ADT/StringSwitch.h"
2525
#include "llvm/MC/MCInstrItineraries.h"
2626
#include "llvm/MC/MCSchedule.h"
2727
#include "llvm/Support/Debug.h"
@@ -306,9 +306,9 @@ unsigned SubtargetEmitter::cpuNames(raw_ostream &OS) {
306306

307307
std::vector<const Record *> ProcessorList =
308308
Records.getAllDerivedDefinitions("Processor");
309-
309+
310310
std::vector<const Record *> ProcessorAliasList =
311-
Records.getAllDerivedDefinitionsIfDefined("ProcessorAlias");
311+
Records.getAllDerivedDefinitionsIfDefined("ProcessorAlias");
312312

313313
SmallVector<StringRef> Names;
314314
Names.reserve(ProcessorList.size() + ProcessorAliasList.size());
@@ -324,7 +324,8 @@ unsigned SubtargetEmitter::cpuNames(raw_ostream &OS) {
324324
}
325325

326326
llvm::sort(Names);
327-
llvm::interleave(Names, OS, [&](StringRef Name) { OS << '"' << Name << '"'; }, ",\n");
327+
llvm::interleave(
328+
Names, OS, [&](StringRef Name) { OS << '"' << Name << '"'; }, ",\n");
328329

329330
// End processor name table.
330331
OS << "};\n";
@@ -2054,7 +2055,7 @@ void SubtargetEmitter::run(raw_ostream &OS) {
20542055
if (NumNames)
20552056
OS << Target << "Names, ";
20562057
else
2057-
OS << "{}, ";
2058+
OS << "{}, ";
20582059
if (NumFeatures)
20592060
OS << Target << "FeatureKV, ";
20602061
else

0 commit comments

Comments
 (0)