This is an archive of the discontinued LLVM Phabricator instance.

When printing MIR, output to errs() rather than outs().
ClosedPublic

Authored by jlebar on Feb 18 2016, 4:14 PM.

Details

Summary

Without this, this command

$ llvm-run llc -stop-after machine-cp -o - <( echo '' )

outputs an error, because we close stdout twice -- once when closing the
file opened for "-o", and again when closing outs().

Also clarify in the outs() definition that you can't ever call it if you
want to open your own raw_fd_ostream on stdout.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 48421.Feb 18 2016, 4:14 PM
jlebar retitled this revision from to When printing MIR, output to errs() rather than outs()..
jlebar updated this object.
jlebar added a reviewer: jroelofs.
jlebar added a subscriber: llvm-commits.
jroelofs accepted this revision.Feb 18 2016, 4:17 PM
jroelofs edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 18 2016, 4:17 PM
This revision was automatically updated to reflect the committed changes.