llvm::createBitcodeWriterPass

Create and return a pass that writes the module to the specified ostream. Note that this pass is designed for use with the legacy pass manager.

Synopsis

Declared in <llvm/Bitcode/BitcodeWriterPass.h>

ModulePass*
createBitcodeWriterPass(
    raw_ostream& Str,
    bool ShouldPreserveUseListOrder = false);

Description

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

Return Value

A ModulePass that writes the module to Str.

Parameters

NameDescription
StrThe output stream to write the bitcode to.
ShouldPreserveUseListOrderIf true, encode use-list order so it can be reproduced when deserialized.