[PM] BitcodeWriterPass should derive from PassInfoMixin
authorTeresa Johnson <tejohnson@google.com>
Fri, 12 Aug 2016 21:33:36 +0000 (21:33 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 12 Aug 2016 21:33:36 +0000 (21:33 +0000)
commit358657f27edf9b2eebf1cc12a4daf47c97eaab33
tree3ccde3393375bdd44d4a3b928d38557108bf5d00
parent9667417a1a1a2590b023e9715a48049118440d42
[PM] BitcodeWriterPass should derive from PassInfoMixin

Summary:
The BitcodeWriterPass was ported a couple years ago, and predates the
PassInfoMixin. Make BitcodeWriterPass from that base class.

Should BitcodeWriterPass be added to the PassRegistry.def file? It seems
like that is only for passes that can be added arbitrarily, e.g. via the
-passes flag to the opt tool. Whereas the bitcode writer is added
specially based on the output type (and requires an output stream and
other parameters). For now I have left it out of the PassRegistry, but
let me know if it should go there.

Finally, I was considering an NFC change of the legacy WriteBitcodePass
to BitcodeWriterLegacyPass to make its usage clearer and more consistent
with other legacy passes. WDYT?

Reviewers: mehdi_amini

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23465

llvm-svn: 278566
llvm/include/llvm/Bitcode/BitcodeWriterPass.h