Skip to content

Commit 6853cc7

Browse files
committed
[MC] Rename a misnamed function. NFC.
The patch renames MakeStartMinusEndExpr() to makeEndMinusStartExpr() to better reflect an expression it creates and fix a naming style issue. Differential Revision: https://reviews.llvm.org/D82079
1 parent 403f953 commit 6853cc7

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

llvm/lib/MC/MCDwarf.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void MCDwarfLineEntry::Make(MCObjectStreamer *MCOS, MCSection *Section) {
135135
//
136136
// This helper routine returns an expression of End - Start + IntVal .
137137
//
138-
static inline const MCExpr *MakeStartMinusEndExpr(MCContext &Ctx,
138+
static inline const MCExpr *makeEndMinusStartExpr(MCContext &Ctx,
139139
const MCSymbol &Start,
140140
const MCSymbol &End,
141141
int IntVal) {
@@ -490,7 +490,7 @@ MCDwarfLineTableHeader::Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
490490
// The length field does not include itself and, in case of the 64-bit DWARF
491491
// format, the DWARF64 mark.
492492
emitAbsValue(*MCOS,
493-
MakeStartMinusEndExpr(context, *LineStartSym, *LineEndSym,
493+
makeEndMinusStartExpr(context, *LineStartSym, *LineEndSym,
494494
UnitLengthBytes),
495495
OffsetSize);
496496

@@ -515,7 +515,7 @@ MCDwarfLineTableHeader::Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
515515
// Length of the prologue, is the next 4 bytes (8 bytes for DWARF64). This is
516516
// actually the length from after the length word, to the end of the prologue.
517517
emitAbsValue(*MCOS,
518-
MakeStartMinusEndExpr(context, *LineStartSym, *ProEndSym,
518+
makeEndMinusStartExpr(context, *LineStartSym, *ProEndSym,
519519
(PreHeaderLengthBytes + OffsetSize)),
520520
OffsetSize);
521521

@@ -940,7 +940,7 @@ static void EmitGenDwarfAranges(MCStreamer *MCOS,
940940
const MCExpr *Addr = MCSymbolRefExpr::create(
941941
StartSymbol, MCSymbolRefExpr::VK_None, context);
942942
const MCExpr *Size =
943-
MakeStartMinusEndExpr(context, *StartSymbol, *EndSymbol, 0);
943+
makeEndMinusStartExpr(context, *StartSymbol, *EndSymbol, 0);
944944
MCOS->emitValue(Addr, AddrSize);
945945
emitAbsValue(*MCOS, Size, AddrSize);
946946
}
@@ -980,7 +980,7 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS,
980980
// The 4 (8 for DWARF64) byte total length of the information for this
981981
// compilation unit, not including the unit length field itself.
982982
const MCExpr *Length =
983-
MakeStartMinusEndExpr(context, *InfoStart, *InfoEnd, UnitLengthBytes);
983+
makeEndMinusStartExpr(context, *InfoStart, *InfoEnd, UnitLengthBytes);
984984
emitAbsValue(*MCOS, Length, OffsetSize);
985985

986986
// The 2 byte DWARF version.
@@ -1148,7 +1148,7 @@ static MCSymbol *emitGenDwarfRanges(MCStreamer *MCOS) {
11481148
const MCExpr *SectionStartAddr = MCSymbolRefExpr::create(
11491149
StartSymbol, MCSymbolRefExpr::VK_None, context);
11501150
const MCExpr *SectionSize =
1151-
MakeStartMinusEndExpr(context, *StartSymbol, *EndSymbol, 0);
1151+
makeEndMinusStartExpr(context, *StartSymbol, *EndSymbol, 0);
11521152
MCOS->emitInt8(dwarf::DW_RLE_start_length);
11531153
MCOS->emitValue(SectionStartAddr, AddrSize);
11541154
MCOS->emitULEB128Value(SectionSize);
@@ -1171,7 +1171,7 @@ static MCSymbol *emitGenDwarfRanges(MCStreamer *MCOS) {
11711171

11721172
// Emit a range list entry spanning this section.
11731173
const MCExpr *SectionSize =
1174-
MakeStartMinusEndExpr(context, *StartSymbol, *EndSymbol, 0);
1174+
makeEndMinusStartExpr(context, *StartSymbol, *EndSymbol, 0);
11751175
MCOS->emitIntValue(0, AddrSize);
11761176
emitAbsValue(*MCOS, SectionSize, AddrSize);
11771177
}
@@ -1567,7 +1567,7 @@ void FrameEmitterImpl::EmitCompactUnwind(const MCDwarfFrameInfo &Frame) {
15671567

15681568
// Range Length
15691569
const MCExpr *Range =
1570-
MakeStartMinusEndExpr(Context, *Frame.Begin, *Frame.End, 0);
1570+
makeEndMinusStartExpr(Context, *Frame.Begin, *Frame.End, 0);
15711571
emitAbsValue(Streamer, Range, 4);
15721572

15731573
// Compact Encoding
@@ -1624,7 +1624,7 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(const MCDwarfFrameInfo &Frame) {
16241624
Streamer.emitInt32(dwarf::DW_LENGTH_DWARF64);
16251625

16261626
// Length
1627-
const MCExpr *Length = MakeStartMinusEndExpr(context, *sectionStart,
1627+
const MCExpr *Length = makeEndMinusStartExpr(context, *sectionStart,
16281628
*sectionEnd, UnitLengthBytes);
16291629
emitAbsValue(Streamer, Length, OffsetSize);
16301630

@@ -1749,7 +1749,7 @@ void FrameEmitterImpl::EmitFDE(const MCSymbol &cieStart,
17491749
Streamer.emitInt32(dwarf::DW_LENGTH_DWARF64);
17501750

17511751
// Length
1752-
const MCExpr *Length = MakeStartMinusEndExpr(context, *fdeStart, *fdeEnd, 0);
1752+
const MCExpr *Length = makeEndMinusStartExpr(context, *fdeStart, *fdeEnd, 0);
17531753
emitAbsValue(Streamer, Length, OffsetSize);
17541754

17551755
Streamer.emitLabel(fdeStart);
@@ -1758,11 +1758,11 @@ void FrameEmitterImpl::EmitFDE(const MCSymbol &cieStart,
17581758
const MCAsmInfo *asmInfo = context.getAsmInfo();
17591759
if (IsEH) {
17601760
const MCExpr *offset =
1761-
MakeStartMinusEndExpr(context, cieStart, *fdeStart, 0);
1761+
makeEndMinusStartExpr(context, cieStart, *fdeStart, 0);
17621762
emitAbsValue(Streamer, offset, OffsetSize);
17631763
} else if (!asmInfo->doesDwarfUseRelocationsAcrossSections()) {
17641764
const MCExpr *offset =
1765-
MakeStartMinusEndExpr(context, SectionStart, cieStart, 0);
1765+
makeEndMinusStartExpr(context, SectionStart, cieStart, 0);
17661766
emitAbsValue(Streamer, offset, OffsetSize);
17671767
} else {
17681768
Streamer.emitSymbolValue(&cieStart, OffsetSize,
@@ -1777,7 +1777,7 @@ void FrameEmitterImpl::EmitFDE(const MCSymbol &cieStart,
17771777

17781778
// PC Range
17791779
const MCExpr *Range =
1780-
MakeStartMinusEndExpr(context, *frame.Begin, *frame.End, 0);
1780+
makeEndMinusStartExpr(context, *frame.Begin, *frame.End, 0);
17811781
emitAbsValue(Streamer, Range, PCSize);
17821782

17831783
if (IsEH) {

0 commit comments

Comments
 (0)