LLVM  mainline
Classes | Namespaces | Enumerations | Functions
ReaderWriter.h File Reference
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/FunctionInfo.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/MemoryBuffer.h"
#include <memory>
#include <string>
Include dependency graph for ReaderWriter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  llvm::BitcodeDiagnosticInfo
struct  std::is_error_code_enum< llvm::BitcodeError >

Namespaces

namespace  llvm
 

Compute iterated dominance frontiers using a linear time algorithm.


namespace  std

Enumerations

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

Functions

ErrorOr< std::unique_ptr
< Module > > 
llvm::getLazyBitcodeModule (std::unique_ptr< MemoryBuffer > &&Buffer, LLVMContext &Context, bool ShouldLazyLoadMetadata=false)
 Read the header of the specified bitcode buffer and prepare for lazy deserialization of function bodies.
ErrorOr< std::unique_ptr
< Module > > 
llvm::getStreamedBitcodeModule (StringRef Name, std::unique_ptr< DataStreamer > Streamer, LLVMContext &Context)
 Read the header of the specified stream and prepare for lazy deserialization and streaming of function bodies.
std::string llvm::getBitcodeTargetTriple (MemoryBufferRef Buffer, LLVMContext &Context)
 Read the header of the specified bitcode buffer and extract just the triple information.
std::string llvm::getBitcodeProducerString (MemoryBufferRef Buffer, LLVMContext &Context)
 Read the header of the specified bitcode buffer and extract just the producer string information.
ErrorOr< std::unique_ptr
< Module > > 
llvm::parseBitcodeFile (MemoryBufferRef Buffer, LLVMContext &Context)
 Read the specified bitcode file, returning the module.
bool llvm::hasFunctionSummary (MemoryBufferRef Buffer, DiagnosticHandlerFunction DiagnosticHandler)
 Check if the given bitcode buffer contains a function summary block.
ErrorOr< std::unique_ptr
< FunctionInfoIndex > > 
llvm::getFunctionInfoIndex (MemoryBufferRef Buffer, DiagnosticHandlerFunction DiagnosticHandler, bool IsLazy=false)
 Parse the specified bitcode buffer, returning the function info index.
std::error_code llvm::readFunctionSummary (MemoryBufferRef Buffer, DiagnosticHandlerFunction DiagnosticHandler, StringRef FunctionName, std::unique_ptr< FunctionInfoIndex > Index)
 This method supports lazy reading of function summary data from the combined index during function importing.
void llvm::WriteBitcodeToFile (const Module *M, raw_ostream &Out, bool ShouldPreserveUseListOrder=false, bool EmitFunctionSummary=false)
 Write the specified module to the specified raw output stream.
void llvm::WriteFunctionSummaryToFile (const FunctionInfoIndex &Index, raw_ostream &Out)
 Write the specified function summary index to the given raw output stream, where it will be written in a new bitcode block.
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.
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).
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.
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.
const std::error_categoryllvm::BitcodeErrorCategory ()
std::error_code llvm::make_error_code (BitcodeError E)