LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::BitcodeWriterPass Class Reference

Pass for writing a module of IR out to a bitcode file. More...

#include "llvm/Bitcode/BitcodeWriterPass.h"

Inheritance diagram for llvm::BitcodeWriterPass:
Inheritance graph
[legend]

Public Member Functions

 BitcodeWriterPass (raw_ostream &OS, bool ShouldPreserveUseListOrder=false, bool EmitSummaryIndex=false, bool EmitModuleHash=false)
 Construct a bitcode writer pass around a particular output stream.
 
PreservedAnalyses run (Module &M, ModuleAnalysisManager &)
 Run the bitcode writer pass, and output the module to the selected output stream.
 
- Public Member Functions inherited from llvm::PassInfoMixin< BitcodeWriterPass >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 

Static Public Member Functions

static bool isRequired ()
 
- Static Public Member Functions inherited from llvm::PassInfoMixin< BitcodeWriterPass >
static StringRef name ()
 Gets the name of the pass we are mixed into.
 

Detailed 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.

Definition at line 41 of file BitcodeWriterPass.h.

Constructor & Destructor Documentation

◆ BitcodeWriterPass()

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

Construct a bitcode writer pass around a particular output stream.

If ShouldPreserveUseListOrder, encode use-list order so it can be reproduced when deserialized.

If EmitSummaryIndex, emit the summary index (currently for use in ThinLTO optimization).

Definition at line 55 of file BitcodeWriterPass.h.

References OS.

Member Function Documentation

◆ isRequired()

static bool llvm::BitcodeWriterPass::isRequired ( )
inlinestatic

Definition at line 66 of file BitcodeWriterPass.h.

◆ run()

PreservedAnalyses BitcodeWriterPass::run ( Module M,
ModuleAnalysisManager AM 
)

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

Definition at line 23 of file BitcodeWriterPass.cpp.

References llvm::PreservedAnalyses::all(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::WriteBitcodeToFile(), and WriteNewDbgInfoFormatToBitcode.

Referenced by llvm::EmbedBitcodePass::run().


The documentation for this class was generated from the following files: