LLVM  6.0.0svn
Classes | Namespaces | Enumerations | Functions
BitcodeReader.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Bitcode/BitCodes.h"
#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/MemoryBuffer.h"
#include <cstdint>
#include <memory>
#include <string>
#include <system_error>
#include <vector>
Include dependency graph for BitcodeReader.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llvm::BitcodeLTOInfo
 Basic information extracted from a bitcode module to be used for LTO. More...
 
class  llvm::BitcodeModule
 Represents a module in a bitcode file. More...
 
struct  llvm::BitcodeFileContents
 
struct  std::is_error_code_enum< llvm::BitcodeError >
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 
 std
 

Enumerations

enum  llvm::BitcodeError { llvm::BitcodeError::CorruptedBitcode = 1 }
 

Functions

std::error_code llvm::errorToErrorCodeAndEmitErrors (LLVMContext &Ctx, Error Err)
 
template<typename T >
ErrorOr< Tllvm::expectedToErrorOrAndEmitErrors (LLVMContext &Ctx, Expected< T > Val)
 
Expected< BitcodeFileContentsllvm::getBitcodeFileContents (MemoryBufferRef Buffer)
 Returns the contents of a bitcode file. More...
 
Expected< std::vector< BitcodeModule > > llvm::getBitcodeModuleList (MemoryBufferRef Buffer)
 Returns a list of modules in the specified bitcode buffer. More...
 
Expected< std::unique_ptr< Module > > llvm::getLazyBitcodeModule (MemoryBufferRef Buffer, LLVMContext &Context, bool ShouldLazyLoadMetadata=false, bool IsImporting=false)
 Read the header of the specified bitcode buffer and prepare for lazy deserialization of function bodies. More...
 
Expected< std::unique_ptr< Module > > llvm::getOwningLazyBitcodeModule (std::unique_ptr< MemoryBuffer > &&Buffer, LLVMContext &Context, bool ShouldLazyLoadMetadata=false, bool IsImporting=false)
 Like getLazyBitcodeModule, except that the module takes ownership of the memory buffer if successful. More...
 
Expected< std::string > llvm::getBitcodeTargetTriple (MemoryBufferRef Buffer)
 Read the header of the specified bitcode buffer and extract just the triple information. More...
 
Expected< boolllvm::isBitcodeContainingObjCCategory (MemoryBufferRef Buffer)
 Return true if Buffer contains a bitcode file with ObjC code (category or class) in it. More...
 
Expected< std::string > llvm::getBitcodeProducerString (MemoryBufferRef Buffer)
 Read the header of the specified bitcode buffer and extract just the producer string information. More...
 
Expected< std::unique_ptr< Module > > llvm::parseBitcodeFile (MemoryBufferRef Buffer, LLVMContext &Context)
 Read the specified bitcode file, returning the module. More...
 
Expected< BitcodeLTOInfollvm::getBitcodeLTOInfo (MemoryBufferRef Buffer)
 Returns LTO information for the specified bitcode file. More...
 
Expected< std::unique_ptr< ModuleSummaryIndex > > llvm::getModuleSummaryIndex (MemoryBufferRef Buffer)
 Parse the specified bitcode buffer, returning the module summary index. More...
 
Error llvm::readModuleSummaryIndex (MemoryBufferRef Buffer, ModuleSummaryIndex &CombinedIndex, uint64_t ModuleId)
 Parse the specified bitcode buffer and merge the index into CombinedIndex. More...
 
Expected< std::unique_ptr< ModuleSummaryIndex > > llvm::getModuleSummaryIndexForFile (StringRef Path, bool IgnoreEmptyThinLTOIndexFile=false)
 Parse the module summary index out of an IR file and return the module summary index object if found, or an empty summary if not. More...
 
bool llvm::isBitcodeWrapper (const unsigned char *BufPtr, const unsigned char *BufEnd)
 isBitcodeWrapper - Return true if the given bytes are the magic bytes for an LLVM IR bitcode wrapper. More...
 
bool llvm::isRawBitcode (const unsigned char *BufPtr, const unsigned char *BufEnd)
 isRawBitcode - Return true if the given bytes are the magic bytes for raw LLVM IR bitcode (without a wrapper). More...
 
bool llvm::isBitcode (const unsigned char *BufPtr, const unsigned char *BufEnd)
 isBitcode - Return true if the given bytes are the magic bytes for LLVM IR bitcode, either with or without a wrapper. More...
 
bool llvm::SkipBitcodeWrapperHeader (const unsigned char *&BufPtr, const unsigned char *&BufEnd, bool VerifyBufferSize)
 SkipBitcodeWrapperHeader - Some systems wrap bc files with a special header for padding or other reasons. More...
 
const std::error_categoryllvm::BitcodeErrorCategory ()
 
std::error_code llvm::make_error_code (BitcodeError E)