LLVM API Documentation
#include "llvm/IRReader/IRReader.h"
#include "llvm-c/Core.h"
#include "llvm-c/IRReader.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/Bitcode/ReaderWriter.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>
Go to the source code of this file.
Namespaces | |
namespace | llvm |
List of target independent CodeGen pass IDs. | |
Functions | |
static std::unique_ptr< Module > | getLazyIRModule (std::unique_ptr< MemoryBuffer > Buffer, SMDiagnostic &Err, LLVMContext &Context) |
LLVMBool | LLVMParseIRInContext (LLVMContextRef ContextRef, LLVMMemoryBufferRef MemBuf, LLVMModuleRef *OutM, char **OutMessage) |
Variables | |
static const char *const | TimeIRParsingGroupName = "LLVM IR Parsing" |
static const char *const | TimeIRParsingName = "Parse IR" |
static std::unique_ptr<Module> getLazyIRModule | ( | std::unique_ptr< MemoryBuffer > | Buffer, |
SMDiagnostic & | Err, | ||
LLVMContext & | Context | ||
) | [static] |
Definition at line 33 of file IRReader.cpp.
References llvm::SourceMgr::DK_Error, llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::getLazyBitcodeModule(), llvm::isBitcode(), and llvm::parseAssembly().
Referenced by llvm::getLazyIRFileModule().
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.
Definition at line 100 of file IRReader.cpp.
References llvm::raw_ostream::flush(), llvm::parseIR(), llvm::SMDiagnostic::print(), llvm::LibFunc::strdup, llvm::unwrap(), and llvm::wrap().
const char* const TimeIRParsingGroupName = "LLVM IR Parsing" [static] |
Definition at line 29 of file IRReader.cpp.
Referenced by llvm::parseIR().
const char* const TimeIRParsingName = "Parse IR" [static] |
Definition at line 30 of file IRReader.cpp.
Referenced by llvm::parseIR().