LLVM  6.0.0svn
Namespaces | Functions | Variables
IRReader.cpp File Reference
#include "llvm/IRReader/IRReader.h"
#include "llvm-c/Core.h"
#include "llvm-c/IRReader.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include <system_error>
Include dependency graph for IRReader.cpp:

Go to the source code of this file.

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Functions

static std::unique_ptr< ModulegetLazyIRModule (std::unique_ptr< MemoryBuffer > Buffer, SMDiagnostic &Err, LLVMContext &Context, bool ShouldLazyLoadMetadata)
 
LLVMBool LLVMParseIRInContext (LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage)
 Read LLVM IR from a memory buffer and convert it into an in-memory Module object. More...
 

Variables

static const char *const TimeIRParsingGroupName = "irparse"
 
static const char *const TimeIRParsingGroupDescription = "LLVM IR Parsing"
 
static const char *const TimeIRParsingName = "parse"
 
static const char *const TimeIRParsingDescription = "Parse IR"
 

Function Documentation

◆ getLazyIRModule()

static std::unique_ptr<Module> getLazyIRModule ( std::unique_ptr< MemoryBuffer Buffer,
SMDiagnostic Err,
LLVMContext Context,
bool  ShouldLazyLoadMetadata 
)
static

◆ LLVMParseIRInContext()

LLVMBool LLVMParseIRInContext ( LLVMContextRef  ContextRef,
LLVMMemoryBufferRef  MemBuf,
LLVMModuleRef OutM,
char **  OutMessage 
)

Read LLVM IR from a memory buffer and convert it into an in-memory Module object.

Returns 0 on success. Optionally returns a human-readable description of any errors that occurred during parsing IR. OutMessage must be disposed with LLVMDisposeMessage.

See also
llvm::ParseIR()

Definition at line 112 of file IRReader.cpp.

References llvm::raw_ostream::flush(), llvm::parseIR(), llvm::SMDiagnostic::print(), llvm::release, llvm::unwrap(), and llvm::wrap().

Variable Documentation

◆ TimeIRParsingDescription

const char* const TimeIRParsingDescription = "Parse IR"
static

Definition at line 32 of file IRReader.cpp.

◆ TimeIRParsingGroupDescription

const char* const TimeIRParsingGroupDescription = "LLVM IR Parsing"
static

Definition at line 30 of file IRReader.cpp.

◆ TimeIRParsingGroupName

const char* const TimeIRParsingGroupName = "irparse"
static

Definition at line 29 of file IRReader.cpp.

◆ TimeIRParsingName

const char* const TimeIRParsingName = "parse"
static

Definition at line 31 of file IRReader.cpp.