[PATCH] D95932: [Debug-Info] [NFC] move emitDwarfUnitLength to MCStreamer class

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 02:17:35 PST 2021


shchenz created this revision.
shchenz added reviewers: ikudrin, hubert.reinterpretcast, jsji, PowerPC, echristo.
Herald added a subscriber: hiraditya.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We may need to do some customization for DWARF unit length in DWARF section headers for some code generation path. 
For example in D95518 <https://reviews.llvm.org/D95518>, for XCOFF in assembly path, AIX assembler does not require the debug section containing its debug unit length in the header.

Thanks to @ikudrin comments, moving the `emitDwarfUnitLength` to class `MCStreamer` can make us avoid the streamer type check in general code.

This is the NFC part to make D95518 <https://reviews.llvm.org/D95518> easy to review. 
Override of  `emitDwarfUnitLength` in `MCAsmStreamer` class will be added in D95518 <https://reviews.llvm.org/D95518>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95932

Files:
  llvm/include/llvm/CodeGen/AsmPrinter.h
  llvm/include/llvm/MC/MCStreamer.h
  llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
  llvm/lib/MC/MCStreamer.cpp
  llvm/unittests/CodeGen/AsmPrinterDwarfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95932.321033.patch
Type: text/x-patch
Size: 4872 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210203/510fc527/attachment.bin>


More information about the llvm-commits mailing list