[PATCH] D95518: [Debug-Info][XCOFF] support dwarf for XCOFF for assembly output
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 3 18:23:23 PST 2021
shchenz added inline comments.
================
Comment at: llvm/lib/MC/MCAsmStreamer.cpp:2146
+ // a line entry for any .loc directive that has been seen.
+ MCDwarfLineEntry::make(this, getCurrentSectionOnly());
+
----------------
jasonliu wrote:
> This is more of a question for my own understanding: when do we need to call `MCDwarfLineEntry::make`?
> It seems in MCObjectStreamer, we would also call `MCDwarfLineEntry::make` in `emitValueImpl` and `emitBytes`. Are those calls not necessary in the MCAsmStreamer counterpart?
I think the calling of `MCDwarfLineEntry::make` in `MCObjectStreamer` is for `DW_LNS_advance_pc` usage.
For `MCAsmStreamer`, we don't use `DW_LNS_advance_pc`, so we only need to add a line entry and a temp label where we generate a `.loc` directive.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95518/new/
https://reviews.llvm.org/D95518
More information about the llvm-commits
mailing list