class BitcodeWriterPass

Declaration

class BitcodeWriterPass : public PassInfoMixin { /* full declaration omitted */ };

Description

Pass for writing a module of IR out to a bitcode file. Note that this is intended for use with the new pass manager. To construct a pass for the legacy pass manager, use the function above.

Declared at: llvm/include/llvm/Bitcode/BitcodeWriterPass.h:49

Inherits from: PassInfoMixin

Member Variables

private llvm::raw_ostream& OS
private bool ShouldPreserveUseListOrder
private bool EmitSummaryIndex
private bool EmitModuleHash

Method Overview

  • public BitcodeWriterPass(llvm::raw_ostream & OS, bool ShouldPreserveUseListOrder = false, bool EmitSummaryIndex = false, bool EmitModuleHash = false)
  • public static bool isRequired()
  • public llvm::PreservedAnalyses run(llvm::Module & M, llvm::ModuleAnalysisManager &)

Methods

BitcodeWriterPass(
    llvm::raw_ostream& OS,
    bool ShouldPreserveUseListOrder = false,
    bool EmitSummaryIndex = false,
    bool EmitModuleHash = false)

Description

Construct a bitcode writer pass around a particular output stream. If \c ShouldPreserveUseListOrder, encode use-list order so it can be reproduced when deserialized. If \c EmitSummaryIndex, emit the summary index (currently for use in ThinLTO optimization).

Declared at: llvm/include/llvm/Bitcode/BitcodeWriterPass.h:63

Parameters

llvm::raw_ostream& OS
bool ShouldPreserveUseListOrder = false
bool EmitSummaryIndex = false
bool EmitModuleHash = false

static bool isRequired()

Declared at: llvm/include/llvm/Bitcode/BitcodeWriterPass.h:74

llvm::PreservedAnalyses run(
    llvm::Module& M,
    llvm::ModuleAnalysisManager&)

Description

Run the bitcode writer pass, and output the module to the selected output stream.

Declared at: llvm/include/llvm/Bitcode/BitcodeWriterPass.h:72

Parameters

llvm::Module& M
llvm::ModuleAnalysisManager&