llvm::getModuleSummaryIndexForFile

Parse the module summary index out of an IR file.

Synopsis

Declared in <llvm/Bitcode/BitcodeReader.h>

Expected<std::unique_ptr<ModuleSummaryIndex>>
getModuleSummaryIndexForFile(
    StringRef Path,
    bool IgnoreEmptyThinLTOIndexFile = false);

Description

Returns the module summary index object if found, or an empty summary if not. If Path refers to an empty file and IgnoreEmptyThinLTOIndexFile is true, then this function will return nullptr.

Return Value

The module summary index, an empty index if none is present, or nullptr when an empty file is ignored.

Parameters

NameDescription
PathPath to the IR or bitcode file to read.
IgnoreEmptyThinLTOIndexFileIf true, treat an empty file as no index.