[PATCH] D19447: Refactor bitcode writer into classes (NFC)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 16:41:07 PDT 2016


tejohnson created this revision.
tejohnson added reviewers: dexonsmith, joker.eph.
tejohnson added a subscriber: llvm-commits.

As discussed in on the mailing list yesterday, I have refactored
BitcodeWriter.cpp to use classes to manage the bitcode writing process,
instead of passing around long lists of parameters between static
functions. See:
  http://lists.llvm.org/pipermail/llvm-dev/2016-April/098610.html

I created a parent BitcodeWriter class to own the BitstreamWriter,
write the header, and contain the main entry point into the writing
process. There are two derived classes, one for writing a module and one
for writing a combined index file (for ThinLTO), which manage the
writing process specific to those bitcode file types.

I also changed the functions to conform to LLVM coding standards
(lowercase function name first letter). The only two routines that still
start with an uppercase letter are the two external interfaces, which
can be fixed as a follow-on (I wanted to keep this round just within
BitcodeWriter.cpp).

http://reviews.llvm.org/D19447

Files:
  lib/Bitcode/Writer/BitcodeWriter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19447.54750.patch
Type: text/x-patch
Size: 134821 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160422/56602023/attachment.bin>


More information about the llvm-commits mailing list