This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] Consistent use of ScopedPrinter
ClosedPublic

Authored by sbc100 on Dec 18 2017, 3:41 PM.

Details

Summary

There were a few places where outs() was being used
directly rather than the ScopedPrinter object.

Diff Detail

Repository
rL LLVM

Event Timeline

sbc100 created this revision.Dec 18 2017, 3:41 PM
sbc100 updated this revision to Diff 127431.Dec 18 2017, 3:59 PM
  • one more cleanup
zturner added inline comments.Jan 4 2018, 3:01 PM
tools/llvm-readobj/StackMapPrinter.h
32–42 ↗(On Diff #127431)

I think you want to remove all these \n characters right? The previous code was basically printing one string on each line, but in the new version each string is terminated with \n, and then another line is started immediately after by calling W.startLine();

sbc100 added inline comments.Jan 4 2018, 3:14 PM
tools/llvm-readobj/StackMapPrinter.h
32–42 ↗(On Diff #127431)

IIUC startLine() only adds indentention, its doesn't add newlines, so any line that is started with startLine() still needs to end in a "\n".

I think the output is unchanged, otherwise test/Object/stackmap-dump.test would be broken.

sbc100 added a comment.Jan 9 2018, 4:09 PM

friendly ping..

zturner accepted this revision.Jan 9 2018, 4:12 PM

Sorry about that! lgtm

This revision is now accepted and ready to land.Jan 9 2018, 4:12 PM
This revision was automatically updated to reflect the committed changes.