LLVM
15.0.0git
|
Represents a module in a bitcode file. More...
#include "llvm/Bitcode/BitcodeReader.h"
Public Member Functions | |
StringRef | getBuffer () const |
StringRef | getStrtab () const |
StringRef | getModuleIdentifier () const |
Expected< std::unique_ptr< Module > > | getLazyModule (LLVMContext &Context, bool ShouldLazyLoadMetadata, bool IsImporting) |
Read the bitcode module and prepare for lazy deserialization of function bodies. More... | |
Expected< std::unique_ptr< Module > > | parseModule (LLVMContext &Context, DataLayoutCallbackTy DataLayoutCallback=[](StringRef) { return None;}) |
Read the entire bitcode module and return it. More... | |
Expected< BitcodeLTOInfo > | getLTOInfo () |
Returns information about the module to be used for LTO: whether to compile with ThinLTO, and whether it has a summary. More... | |
Expected< std::unique_ptr< ModuleSummaryIndex > > | getSummary () |
Parse the specified bitcode buffer, returning the module summary index. More... | |
Error | readSummary (ModuleSummaryIndex &CombinedIndex, StringRef ModulePath, uint64_t ModuleId) |
Parse the specified bitcode buffer and merge its module summary index into CombinedIndex. More... | |
Friends | |
Expected< BitcodeFileContents > | getBitcodeFileContents (MemoryBufferRef Buffer) |
Returns the contents of a bitcode file. More... | |
Represents a module in a bitcode file.
Definition at line 61 of file BitcodeReader.h.
|
inline |
Definition at line 90 of file BitcodeReader.h.
Expected< std::unique_ptr< Module > > BitcodeModule::getLazyModule | ( | LLVMContext & | Context, |
bool | ShouldLazyLoadMetadata, | ||
bool | IsImporting | ||
) |
Read the bitcode module and prepare for lazy deserialization of function bodies.
If ShouldLazyLoadMetadata is true, lazily load metadata as well. If IsImporting is true, this module is being parsed for ThinLTO importing into another module.
Definition at line 7333 of file BitcodeReader.cpp.
References Context, and llvm::None.
Expected< BitcodeLTOInfo > BitcodeModule::getLTOInfo | ( | ) |
Returns information about the module to be used for LTO: whether to compile with ThinLTO, and whether it has a summary.
Definition at line 7415 of file BitcodeReader.cpp.
References move.
|
inline |
Definition at line 96 of file BitcodeReader.h.
|
inline |
Definition at line 94 of file BitcodeReader.h.
Expected< std::unique_ptr< ModuleSummaryIndex > > BitcodeModule::getSummary | ( | ) |
Parse the specified bitcode buffer, returning the module summary index.
Definition at line 7355 of file BitcodeReader.cpp.
References move.
Expected< std::unique_ptr< Module > > BitcodeModule::parseModule | ( | LLVMContext & | Context, |
DataLayoutCallbackTy | DataLayoutCallback = [](StringRef) { return None; } |
||
) |
Read the entire bitcode module and return it.
Definition at line 7500 of file BitcodeReader.cpp.
References Context.
Error BitcodeModule::readSummary | ( | ModuleSummaryIndex & | CombinedIndex, |
StringRef | ModulePath, | ||
uint64_t | ModuleId | ||
) |
Parse the specified bitcode buffer and merge its module summary index into CombinedIndex.
Definition at line 7343 of file BitcodeReader.cpp.
References move.
|
friend |
Returns the contents of a bitcode file.
This includes the raw contents of the symbol table embedded in the bitcode file. Clients which require a symbol table should prefer to use irsymtab::read instead of this function because it creates a reader for the irsymtab and handles upgrading bitcode files without a symbol table or with an old symbol table.