This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dwarfdump] --statistics: break lines and indent by 2
ClosedPublic

Authored by MaskRay on Aug 20 2020, 2:33 PM.

Details

Summary

so that the user does not have to pipe the output to jq or python -m json.tool.
This change makes testing more convenient because -NEXT patterns can be used.
The "prettify by default" is a good tradeoff to make. The output size increases a bit.

Diff Detail

Event Timeline

MaskRay created this revision.Aug 20 2020, 2:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 2:33 PM
MaskRay requested review of this revision.Aug 20 2020, 2:33 PM
jhenderson accepted this revision.Aug 21 2020, 12:04 AM
jhenderson added a subscriber: Orlando.

Seems reasonable to me, but let's give others a chance to comment.

llvm/test/tools/llvm-dwarfdump/X86/stats-inlining-single-cu.ll
9–11

Commas here too?

This revision is now accepted and ready to land.Aug 21 2020, 12:04 AM
MaskRay updated this revision to Diff 287049.Aug 21 2020, 8:55 AM
MaskRay marked an inline comment as done.

Add missing commas to 3 lines

aprantl added inline comments.Aug 21 2020, 9:27 AM
llvm/tools/llvm-dwarfdump/Statistics.cpp
469

Does this comment need to be changed now?

(The original idea was to have an output format that can be parsed by regex / awk and by a full JSON parser, but I'm fine with dropping this requirement.)

MaskRay updated this revision to Diff 287052.Aug 21 2020, 9:32 AM
MaskRay marked an inline comment as done.

Fix a stale comment.

This revision was landed with ongoing or failed builds.Aug 22 2020, 1:58 PM
This revision was automatically updated to reflect the committed changes.