[PATCH] D80989: [DebugInfo] Print non-verbose output at some point as verbose output
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 03:45:30 PDT 2020
jhenderson marked 4 inline comments as done.
jhenderson added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:744-749
while (*OffsetPtr < EndOffset) {
- if (OS)
+ if (OS && !HeaderPrinted) {
+ *OS << "\n";
+ Row::dumpTableHeader(*OS, Verbose ? 12 : 0);
+ HeaderPrinted = true;
+ }
----------------
dblaikie wrote:
> Maybe put this outside the while loop so it doesn't have to be tested every time?
>
> ```
> if (*OffsetPtr < EndOffset && OS)
> Row::dumpTableHeader(*OS << '\n', Verbose ? 12 : 0);
> while (*OffsetPtr < EndOffset)
> ...
> ```
>
> Though it does mean duplicating the loop condition (could put it in a lambda), which isn't ideal either - certainly up to you, just figured I'd float the idea.
This was solved by rebasing on @MaskRay's latest version of D80874.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:920-922
+ if (OS) {
State.Row.dump(*OS);
}
----------------
dblaikie wrote:
> Could drop the braces here
Done, thanks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80989/new/
https://reviews.llvm.org/D80989
More information about the llvm-commits
mailing list