LLVM
8.0.1
|
Simple compile functor: Takes a single IR module and returns an ObjectFile. More...
#include "llvm/ExecutionEngine/Orc/CompileUtils.h"
Public Types | |
using | CompileResult = std::unique_ptr< MemoryBuffer > |
Public Member Functions | |
SimpleCompiler (TargetMachine &TM, ObjectCache *ObjCache=nullptr) | |
Construct a simple compile functor with the given target. More... | |
void | setObjectCache (ObjectCache *NewCache) |
Set an ObjectCache to query before compiling. More... | |
CompileResult | operator() (Module &M) |
Compile a Module to an ObjectFile. More... | |
Simple compile functor: Takes a single IR module and returns an ObjectFile.
This compiler supports a single compilation thread and LLVMContext only. For multithreaded compilation, use ConcurrentIRCompiler below.
Definition at line 42 of file CompileUtils.h.
using llvm::orc::SimpleCompiler::CompileResult = std::unique_ptr<MemoryBuffer> |
Definition at line 44 of file CompileUtils.h.
|
inline |
Construct a simple compile functor with the given target.
Definition at line 47 of file CompileUtils.h.
|
inline |
Compile a Module to an ObjectFile.
Definition at line 54 of file CompileUtils.h.
References llvm::TargetMachine::addPassesToEmitMC(), llvm::consumeError(), llvm::object::ObjectFile::createObjectFile(), llvm::MemoryBuffer::getMemBufferRef(), llvm::ObjectCache::getObject(), llvm_unreachable, llvm::ObjectCache::notifyObjectCompiled(), and llvm::legacy::PassManager::run().
|
inline |
Set an ObjectCache to query before compiling.
Definition at line 51 of file CompileUtils.h.