Skip to content

Commit aa1fbf3

Browse files
author
Amirhossein Pashaeehir
committed
Sync the braces styles
1 parent d231713 commit aa1fbf3

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

llvm/lib/DWARFCFIChecker/DWARFCFIAnalysis.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ static std::optional<CFARegOffsetInfo>
4747
getCFARegOffsetInfo(const dwarf::UnwindRow &UnwindRow) {
4848
auto CFALocation = UnwindRow.getCFAValue();
4949
if (CFALocation.getLocation() !=
50-
dwarf::UnwindLocation::Location::RegPlusOffset) {
50+
dwarf::UnwindLocation::Location::RegPlusOffset)
5151
return std::nullopt;
52-
}
5352

5453
return CFARegOffsetInfo(CFALocation.getRegister(), CFALocation.getOffset());
5554
}
@@ -103,9 +102,8 @@ DWARFCFIAnalysis::DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII,
103102
nullptr, MCRI->getDwarfRegNum(MCRI->getProgramCounter(), IsEH)));
104103

105104
for (auto &&InitialFrameStateCFIDirective :
106-
Context->getAsmInfo()->getInitialFrameState()) {
105+
Context->getAsmInfo()->getInitialFrameState())
107106
State.update(InitialFrameStateCFIDirective);
108-
}
109107

110108
auto MaybeCurrentRow = State.getCurrentUnwindRow();
111109
assert(MaybeCurrentRow && "there should be at least one row");
@@ -119,9 +117,8 @@ DWARFCFIAnalysis::DWARFCFIAnalysis(MCContext *Context, MCInstrInfo const &MCII,
119117
State.update(MCCFIInstruction::createOffset(nullptr, CFA.Reg, 0));
120118

121119
// Applying the prologue after default assumptions to overwrite them.
122-
for (auto &&Directive : Prologue) {
120+
for (auto &&Directive : Prologue)
123121
State.update(Directive);
124-
}
125122
}
126123

127124
void DWARFCFIAnalysis::update(const MCInst &Inst,

llvm/lib/DWARFCFIChecker/Registers.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ inline bool isSuperReg(const MCRegisterInfo *MCRI, MCPhysReg Reg) {
3030

3131
inline SmallVector<MCPhysReg> getSuperRegs(const MCRegisterInfo *MCRI) {
3232
SmallVector<MCPhysReg> SuperRegs;
33-
for (auto &&RegClass : MCRI->regclasses()) {
33+
for (auto &&RegClass : MCRI->regclasses())
3434
for (unsigned I = 0; I < RegClass.getNumRegs(); I++) {
3535
MCPhysReg Reg = RegClass.getRegister(I);
3636
if (isSuperReg(MCRI, Reg))
3737
SuperRegs.push_back(Reg);
3838
}
39-
}
4039

4140
sort(SuperRegs.begin(), SuperRegs.end());
4241
SuperRegs.resize(std::distance(
@@ -55,10 +54,9 @@ inline SmallVector<MCPhysReg> getTrackingRegs(const MCRegisterInfo *MCRI) {
5554
inline MCPhysReg getSuperReg(const MCRegisterInfo *MCRI, MCPhysReg Reg) {
5655
if (isSuperReg(MCRI, Reg))
5756
return Reg;
58-
for (auto SuperReg : MCRI->superregs(Reg)) {
57+
for (auto SuperReg : MCRI->superregs(Reg))
5958
if (isSuperReg(MCRI, SuperReg))
6059
return SuperReg;
61-
}
6260

6361
llvm_unreachable("Should either be a super reg, or have a super reg");
6462
}

0 commit comments

Comments
 (0)