llvm::writeIndexToFile

Write a module summary index to Out as a new bitcode block.

Synopsis

Declared in <llvm/Bitcode/BitcodeWriter.h>

void
writeIndexToFile(
    ModuleSummaryIndex const& Index,
    raw_ostream& Out,
    ModuleToSummariesForIndexTy const* ModuleToSummariesForIndex = nullptr,
    GVSummaryPtrSet const* DecSummaries = nullptr);

Description

Used when writing the combined index file for ThinLTO. When writing a subset of the index for a distributed backend, provide ModuleToSummariesForIndex.

Parameters

NameDescription
IndexCombined or per-module summary index to write.
OutStream that receives the encoded index bitcode.
ModuleToSummariesForIndexOptional map from module name to the summaries to include for a distributed ThinLTO backend.
DecSummariesOptional set of summaries whose values should be imported as declarations (prototypes).