This is an archive of the discontinued LLVM Phabricator instance.

[MC] Allow MCObjectWriter's output stream to be swapped out
ClosedPublic

Authored by majnemer on Aug 31 2015, 4:55 PM.

Details

Summary

There are occasions where it is useful to consider the entirety of the
contents of a section. For example, compressed debug info needs the
entire section available before it can compress it and write it out.
The compressed debug info scenario was previously implemented by
mirroring the implementation of writeSectionData in the ELFObjectWriter.

Instead, allow the output stream to be swapped on demand. This lets
callers redirect the output stream to a more convenient location before
it hits the object file.

No functionality change is intended.

Diff Detail

Repository
rL LLVM

Event Timeline

majnemer updated this revision to Diff 33649.Aug 31 2015, 4:55 PM
majnemer retitled this revision from to [MC] Allow MCObjectWriter's output stream to be swapped out.
majnemer updated this object.
majnemer added a reviewer: llvm-commits.
majnemer added subscribers: rafael, grosbach, echristo.
rafael accepted this revision.Sep 1 2015, 6:25 AM
rafael added a reviewer: rafael.

Nice!

This revision is now accepted and ready to land.Sep 1 2015, 6:25 AM
This revision was automatically updated to reflect the committed changes.