[PATCH] D49670: dwarfgen: Add support for generating the debug_str_offsets section

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 17:57:14 PDT 2018


dblaikie added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfStringPool.h:40
+  void emitStringOffsetsTableHeader(AsmPrinter &Asm, MCSection *OffsetSection,
+                                    MCSymbol *StartSym);
+
----------------
Is a forward decl of MCSymbol required up with MCSection/AsmPrinter then?


================
Comment at: unittests/DebugInfo/DWARF/DwarfGenerator.cpp:473-476
+  StringPool->emitStringOffsetsTableHeader(*Asm, MOFI->getDwarfStrOffSection(),
+                                           StringOffsetsStartSym);
+  StringPool->emit(*Asm, MOFI->getDwarfStrSection(),
+                   MOFI->getDwarfStrOffSection());
----------------
Why split this into two functions rather than having emit do the table header itself/internally?


Repository:
  rL LLVM

https://reviews.llvm.org/D49670





More information about the llvm-commits mailing list