[PATCH] D75568: [MCDwarf] Change the MCStreamer * parameter of emitListsTableHeaderStart to a reference. NFC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 14:24:33 PST 2020
MaskRay created this revision.
MaskRay added a reviewer: dblaikie.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D75568
Files:
llvm/include/llvm/MC/MCDwarf.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/MC/MCDwarf.cpp
Index: llvm/lib/MC/MCDwarf.cpp
===================================================================
--- llvm/lib/MC/MCDwarf.cpp
+++ llvm/lib/MC/MCDwarf.cpp
@@ -45,17 +45,17 @@
using namespace llvm;
-void mcdwarf::emitListsTableHeaderStart(MCStreamer *S, MCSymbol *TableStart,
+void mcdwarf::emitListsTableHeaderStart(MCStreamer &S, MCSymbol *TableStart,
MCSymbol *TableEnd) {
- S->AddComment("Length");
- S->emitAbsoluteSymbolDiff(TableEnd, TableStart, 4);
- S->emitLabel(TableStart);
- S->AddComment("Version");
- S->emitInt16(S->getContext().getDwarfVersion());
- S->AddComment("Address size");
- S->emitInt8(S->getContext().getAsmInfo()->getCodePointerSize());
- S->AddComment("Segment selector size");
- S->emitInt8(0);
+ S.AddComment("Length");
+ S.emitAbsoluteSymbolDiff(TableEnd, TableStart, 4);
+ S.emitLabel(TableStart);
+ S.AddComment("Version");
+ S.emitInt16(S.getContext().getDwarfVersion());
+ S.AddComment("Address size");
+ S.emitInt8(S.getContext().getAsmInfo()->getCodePointerSize());
+ S.AddComment("Segment selector size");
+ S.emitInt8(0);
}
/// Manage the .debug_line_str section contents, if we use it.
@@ -1121,7 +1121,7 @@
context.createTempSymbol("debug_rnglists_start", true, true);
MCSymbol *EndSymbol =
context.createTempSymbol("debug_rnglists_end", true, true);
- mcdwarf::emitListsTableHeaderStart(MCOS, StartSymbol, EndSymbol);
+ mcdwarf::emitListsTableHeaderStart(*MCOS, StartSymbol, EndSymbol);
MCOS->AddComment("Offset entry count");
MCOS->emitInt32(0);
RangesSymbol = context.createTempSymbol("debug_rnglist0_start", true, true);
Index: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2407,8 +2407,7 @@
const DwarfFile &Holder) {
MCSymbol *TableStart = Asm->createTempSymbol("debug_rnglist_table_start");
MCSymbol *TableEnd = Asm->createTempSymbol("debug_rnglist_table_end");
- mcdwarf::emitListsTableHeaderStart(Asm->OutStreamer.get(), TableStart,
- TableEnd);
+ mcdwarf::emitListsTableHeaderStart(*Asm->OutStreamer, TableStart, TableEnd);
Asm->OutStreamer->AddComment("Offset entry count");
Asm->emitInt32(Holder.getRangeLists().size());
@@ -2427,8 +2426,7 @@
const DwarfDebug &DD) {
MCSymbol *TableStart = Asm->createTempSymbol("debug_loclist_table_start");
MCSymbol *TableEnd = Asm->createTempSymbol("debug_loclist_table_end");
- mcdwarf::emitListsTableHeaderStart(Asm->OutStreamer.get(), TableStart,
- TableEnd);
+ mcdwarf::emitListsTableHeaderStart(*Asm->OutStreamer, TableStart, TableEnd);
const auto &DebugLocs = DD.getDebugLocs();
Index: llvm/include/llvm/MC/MCDwarf.h
===================================================================
--- llvm/include/llvm/MC/MCDwarf.h
+++ llvm/include/llvm/MC/MCDwarf.h
@@ -43,7 +43,7 @@
namespace mcdwarf {
// Emit the common part of the DWARF 5 range/locations list tables header.
-void emitListsTableHeaderStart(MCStreamer *S, MCSymbol *TableStart,
+void emitListsTableHeaderStart(MCStreamer &S, MCSymbol *TableStart,
MCSymbol *TableEnd);
} // namespace mcdwarf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75568.248026.patch
Type: text/x-patch
Size: 3445 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200303/945d4b5b/attachment.bin>
More information about the llvm-commits
mailing list