Page MenuHomePhabricator

Frontend: Simplify handling of non-seeking streams in CompilerInstance, NFC
ClosedPublic

Authored by dexonsmith on Dec 14 2020, 5:52 PM.

Details

Summary

Add a new raw_pwrite_ostream variant, buffer_unique_ostream, which
is like buffer_ostream but with unique ownership of the stream it's
wrapping. Use this in CompilerInstance to simplify the ownership of
non-seeking output streams, avoiding logic sprawled around to deal with
them specially.

This also simplifies future work to encapsulate output files in a
different class.

Diff Detail

Event Timeline

dexonsmith created this revision.Dec 14 2020, 5:52 PM
dexonsmith requested review of this revision.Dec 14 2020, 5:52 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 14 2020, 5:52 PM
This revision is now accepted and ready to land.Jan 26 2021, 2:32 PM
This revision was landed with ongoing or failed builds.Jan 26 2021, 3:21 PM
This revision was automatically updated to reflect the committed changes.