This is an archive of the discontinued LLVM Phabricator instance.

[MIR] Print the regular output of mir in the output file
ClosedPublic

Authored by qcolombet on Jul 11 2016, 6:27 PM.

Details

Summary

Hi,

Currently the MIR framework prints all its outputs (errors and actual representation) on stderr.

This patch fixes that by printing the regular output in the output specified with -o.

The patch itself is pretty straightforward but a lot of tests have to be updated, that’s why I put up a review.
Basically, every test that uses mir needs to be updated to:

  1. Replace -o /dev/null into -o -
  2. Get rid of the useless 2>&1

The change is pretty mechanical.

Diff Detail

Repository
rL LLVM

Event Timeline

qcolombet updated this revision to Diff 63617.Jul 11 2016, 6:27 PM
qcolombet retitled this revision from to [MIR] Print the regular output of mir in the output file.
qcolombet updated this object.
qcolombet added a reviewer: MatzeB.
qcolombet set the repository for this revision to rL LLVM.
qcolombet added a subscriber: llvm-commits.
MatzeB accepted this revision.Jul 11 2016, 6:33 PM
MatzeB edited edge metadata.

The change LGTM.

We should change llc to construct a .mir filename instead of .s/.o when -stop-after is used. However I am fine with doing that in a followup patch.

This revision is now accepted and ready to land.Jul 11 2016, 6:33 PM

Hi Matthias,

Good idea!

I'll do that in a following patch.

Thanks,
-Quentin

This revision was automatically updated to reflect the committed changes.