Skip to content

Commit 67b9205

Browse files
Fix formatting
1 parent 1b1eb72 commit 67b9205

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

llvm/lib/MC/MCSFrame.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include "llvm/MC/MCSFrame.h"
1010
#include "llvm/BinaryFormat/SFrame.h"
11-
#include "llvm/MC/MCContext.h"
1211
#include "llvm/MC/MCAsmInfo.h"
12+
#include "llvm/MC/MCContext.h"
1313
#include "llvm/MC/MCObjectFileInfo.h"
1414
#include "llvm/MC/MCObjectStreamer.h"
1515
#include "llvm/MC/MCSection.h"
@@ -32,7 +32,7 @@ struct SFrameFDE {
3232
SFrameFDE(const MCDwarfFrameInfo &DF, MCSymbol *FRES)
3333
: DFrame(DF), FREStart(FRES) {}
3434

35-
void emit(MCObjectStreamer &S, const MCSymbol* FRESubSectionStart) {
35+
void emit(MCObjectStreamer &S, const MCSymbol *FRESubSectionStart) {
3636
MCContext &C = S.getContext();
3737

3838
// sfde_func_start_address
@@ -45,9 +45,9 @@ struct SFrameFDE {
4545

4646
// sfde_func_start_fre_off
4747
auto *F = S.getCurrentFragment();
48-
const MCExpr *Diff =
49-
MCBinaryExpr::createSub(MCSymbolRefExpr::create(FREStart, C),
50-
MCSymbolRefExpr::create(FRESubSectionStart, C), C);
48+
const MCExpr *Diff = MCBinaryExpr::createSub(
49+
MCSymbolRefExpr::create(FREStart, C),
50+
MCSymbolRefExpr::create(FRESubSectionStart, C), C);
5151

5252
F->addFixup(MCFixup::create(F->getContents().size(), Diff,
5353
MCFixup::getDataKindForSize(4)));
@@ -57,7 +57,7 @@ struct SFrameFDE {
5757
S.emitInt32(0);
5858

5959
// sfde_func_info word
60-
FDEInfo I;
60+
FDEInfo<endianness::native> I;
6161
I.setFuncInfo(0 /* No pauth key */, FDEType::PCInc, FREType::Addr1);
6262
S.emitInt8(I.Info);
6363

@@ -76,7 +76,6 @@ class SFrameEmitterImpl {
7676
MCObjectStreamer &Streamer;
7777
SmallVector<SFrameFDE> FDEs;
7878
ABI SFrameABI;
79-
8079
MCSymbol *FDESubSectionStart;
8180
MCSymbol *FRESubSectionStart;
8281
MCSymbol *FRESubSectionEnd;
@@ -89,7 +88,6 @@ class SFrameEmitterImpl {
8988
.has_value());
9089
FDEs.reserve(Streamer.getDwarfFrameInfos().size());
9190
SFrameABI = *Streamer.getContext().getObjectFileInfo()->getSFrameABIArch();
92-
9391
FDESubSectionStart = Streamer.getContext().createTempSymbol();
9492
FRESubSectionStart = Streamer.getContext().createTempSymbol();
9593
FRESubSectionEnd = Streamer.getContext().createTempSymbol();
@@ -117,10 +115,8 @@ class SFrameEmitterImpl {
117115
Streamer.emitInt8(0);
118116
// shf_num_fdes
119117
Streamer.emitInt32(FDEs.size());
120-
121118
// shf_num_fres
122119
Streamer.emitInt32(0);
123-
124120
// shf_fre_len
125121
Streamer.emitAbsoluteSymbolDiff(FRESubSectionEnd, FRESubSectionStart,
126122
sizeof(int32_t));
@@ -153,15 +149,18 @@ void MCSFrameEmitter::emit(MCObjectStreamer &Streamer) {
153149
// If this target doesn't support sframes, return now. Gas doesn't warn in
154150
// this case, but if we want to, it should be done at option-parsing time,
155151
// rather than here.
156-
if (!Streamer.getContext().getObjectFileInfo()->getSFrameABIArch().has_value())
152+
if (!Streamer.getContext()
153+
.getObjectFileInfo()
154+
->getSFrameABIArch()
155+
.has_value())
157156
return;
158157

159158
SFrameEmitterImpl Emitter(Streamer);
160159
ArrayRef<MCDwarfFrameInfo> FrameArray = Streamer.getDwarfFrameInfos();
161160

162161
// Both the header itself and the FDEs include various offsets and counts.
163162
// Therefore, all of this must be precomputed.
164-
for (const auto& DFrame : FrameArray)
163+
for (const auto &DFrame : FrameArray)
165164
Emitter.BuildSFDE(DFrame);
166165

167166
MCSection *Section = Context.getObjectFileInfo()->getSFrameSection();

0 commit comments

Comments
 (0)