[PATCH] D12509: [MC] Allow MCObjectWriter's output stream to be swapped out

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 16:55:22 PDT 2015


majnemer created this revision.
majnemer added a reviewer: llvm-commits.
majnemer added subscribers: rafael, grosbach, echristo.

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.

http://reviews.llvm.org/D12509

Files:
  include/llvm/MC/MCObjectWriter.h
  lib/MC/ELFObjectWriter.cpp
  lib/MC/MachObjectWriter.cpp
  lib/MC/WinCOFFObjectWriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12509.33649.patch
Type: text/x-patch
Size: 17100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150831/a1b08f68/attachment.bin>


More information about the llvm-commits mailing list