diff options
author | Fangrui Song <i@maskray.me> | 2025-03-06 00:00:05 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-03-06 00:00:05 -0800 |
commit | 687854aea8fdb20525af749069cf19bf612eaf2b (patch) | |
tree | 6ff577fc05dbeb1d534719ea94f8b288476811d7 /llvm/lib/MC/MCDwarf.cpp | |
parent | a6151f4e237075919c12a120c391a8b6c6a5000c (diff) | |
download | llvm-687854aea8fdb20525af749069cf19bf612eaf2b.zip llvm-687854aea8fdb20525af749069cf19bf612eaf2b.tar.gz llvm-687854aea8fdb20525af749069cf19bf612eaf2b.tar.bz2 |
[MC] Remove unneeded VK_None argument from MCSymbolRefExpr::create. NFC
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r-- | llvm/lib/MC/MCDwarf.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp index c17e915..2525ff0 100644 --- a/llvm/lib/MC/MCDwarf.cpp +++ b/llvm/lib/MC/MCDwarf.cpp @@ -916,8 +916,7 @@ static void EmitGenDwarfAranges(MCStreamer *MCOS, assert(StartSymbol && "StartSymbol must not be NULL"); assert(EndSymbol && "EndSymbol must not be NULL"); - const MCExpr *Addr = MCSymbolRefExpr::create( - StartSymbol, MCSymbolRefExpr::VK_None, context); + const MCExpr *Addr = MCSymbolRefExpr::create(StartSymbol, context); const MCExpr *Size = makeEndMinusStartExpr(context, *StartSymbol, *EndSymbol, 0); MCOS->emitValue(Addr, AddrSize); @@ -1018,13 +1017,11 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS, assert(EndSymbol && "EndSymbol must not be NULL"); // AT_low_pc, the first address of the default .text section. - const MCExpr *Start = MCSymbolRefExpr::create( - StartSymbol, MCSymbolRefExpr::VK_None, context); + const MCExpr *Start = MCSymbolRefExpr::create(StartSymbol, context); MCOS->emitValue(Start, AddrSize); // AT_high_pc, the last address of the default .text section. - const MCExpr *End = MCSymbolRefExpr::create( - EndSymbol, MCSymbolRefExpr::VK_None, context); + const MCExpr *End = MCSymbolRefExpr::create(EndSymbol, context); MCOS->emitValue(End, AddrSize); } @@ -1091,8 +1088,7 @@ static void EmitGenDwarfInfo(MCStreamer *MCOS, MCOS->emitInt32(Entry.getLineNumber()); // AT_low_pc, start address of the label. - const MCExpr *AT_low_pc = MCSymbolRefExpr::create(Entry.getLabel(), - MCSymbolRefExpr::VK_None, context); + const auto *AT_low_pc = MCSymbolRefExpr::create(Entry.getLabel(), context); MCOS->emitValue(AT_low_pc, AddrSize); } @@ -1124,8 +1120,8 @@ static MCSymbol *emitGenDwarfRanges(MCStreamer *MCOS) { for (MCSection *Sec : Sections) { const MCSymbol *StartSymbol = Sec->getBeginSymbol(); const MCSymbol *EndSymbol = Sec->getEndSymbol(context); - const MCExpr *SectionStartAddr = MCSymbolRefExpr::create( - StartSymbol, MCSymbolRefExpr::VK_None, context); + const MCExpr *SectionStartAddr = + MCSymbolRefExpr::create(StartSymbol, context); const MCExpr *SectionSize = makeEndMinusStartExpr(context, *StartSymbol, *EndSymbol, 0); MCOS->emitInt8(dwarf::DW_RLE_start_length); @@ -1143,8 +1139,8 @@ static MCSymbol *emitGenDwarfRanges(MCStreamer *MCOS) { const MCSymbol *EndSymbol = Sec->getEndSymbol(context); // Emit a base address selection entry for the section start. - const MCExpr *SectionStartAddr = MCSymbolRefExpr::create( - StartSymbol, MCSymbolRefExpr::VK_None, context); + const MCExpr *SectionStartAddr = + MCSymbolRefExpr::create(StartSymbol, context); MCOS->emitFill(AddrSize, 0xFF); MCOS->emitValue(SectionStartAddr, AddrSize); |