LLVM: llvm::BitcodeModule Class Reference (original) (raw)
Represents a module in a bitcode file. More...
#include "[llvm/Bitcode/BitcodeReader.h](BitcodeReader%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| StringRef | getBuffer () const |
| StringRef | getStrtab () const |
| StringRef | getModuleIdentifier () const |
| LLVM_ABI Expected< std::unique_ptr< Module > > | getLazyModule (LLVMContext &Context, bool ShouldLazyLoadMetadata, bool IsImporting, ParserCallbacks Callbacks={}) |
| Read the bitcode module and prepare for lazy deserialization of function bodies. | |
| LLVM_ABI Expected< std::unique_ptr< Module > > | parseModule (LLVMContext &Context, ParserCallbacks Callbacks={}) |
| Read the entire bitcode module and return it. | |
| LLVM_ABI Expected< BitcodeLTOInfo > | getLTOInfo () |
| Returns information about the module to be used for LTO: whether to compile with ThinLTO, and whether it has a summary. | |
| LLVM_ABI Expected< std::unique_ptr< ModuleSummaryIndex > > | getSummary () |
| Parse the specified bitcode buffer, returning the module summary index. | |
| LLVM_ABI Error | readSummary (ModuleSummaryIndex &CombinedIndex, StringRef ModulePath, std::function< bool(GlobalValue::GUID)> IsPrevailing=nullptr) |
| Parse the specified bitcode buffer and merge its module summary index into CombinedIndex. |
Represents a module in a bitcode file.
Definition at line 103 of file BitcodeReader.h.
◆ getBuffer()
| StringRef llvm::BitcodeModule::getBuffer ( ) const | inline |
|---|
◆ getLazyModule()
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 8564 of file BitcodeReader.cpp.
◆ 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 8649 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advance(), llvm::BitcodeLTOInfo::EnableSplitLTOUnit, llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), llvm::BitstreamEntry::Error, error, llvm::bitc::FULL_LTO_GLOBALVAL_SUMMARY_BLOCK_ID, getEnableSplitLTOUnitAndUnifiedFlag(), llvm::bitc::GLOBALVAL_SUMMARY_BLOCK_ID, llvm::BitcodeLTOInfo::HasSummary, llvm::BitcodeLTOInfo::IsThinLTO, llvm::BitstreamCursor::JumpToBit(), llvm::bitc::MODULE_BLOCK_ID, llvm::BitstreamEntry::Record, llvm::BitstreamCursor::SkipBlock(), llvm::BitstreamCursor::skipRecord(), llvm::BitstreamEntry::SubBlock, and llvm::BitcodeLTOInfo::UnifiedLTO.
◆ getModuleIdentifier()
| StringRef llvm::BitcodeModule::getModuleIdentifier ( ) const | inline |
|---|
◆ getStrtab()
| StringRef llvm::BitcodeModule::getStrtab ( ) const | inline |
|---|
◆ getSummary()
◆ parseModule()
◆ readSummary()
◆ getBitcodeFileContents
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.
The documentation for this class was generated from the following files:
- include/llvm/Bitcode/BitcodeReader.h
- lib/Bitcode/Reader/BitcodeReader.cpp