LLVM 20.0.0git
|
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. | |
void | setObjectCache (ObjectCache *NewCache) |
Set an ObjectCache to query before compiling. | |
Expected< CompileResult > | operator() (Module &M) override |
Compile a Module to an ObjectFile. | |
Public Member Functions inherited from llvm::orc::IRCompileLayer::IRCompiler | |
IRCompiler (IRSymbolMapper::ManglingOptions MO) | |
virtual | ~IRCompiler () |
const IRSymbolMapper::ManglingOptions & | getManglingOptions () const |
virtual Expected< std::unique_ptr< MemoryBuffer > > | operator() (Module &M)=0 |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::orc::IRCompileLayer::IRCompiler | |
IRSymbolMapper::ManglingOptions & | manglingOptions () |
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 36 of file CompileUtils.h.
using llvm::orc::SimpleCompiler::CompileResult = std::unique_ptr<MemoryBuffer> |
Definition at line 38 of file CompileUtils.h.
|
inline |
Construct a simple compile functor with the given target.
Definition at line 41 of file CompileUtils.h.
|
overridevirtual |
Compile a Module to an ObjectFile.
Implements llvm::orc::IRCompileLayer::IRCompiler.
Definition at line 35 of file CompileUtils.cpp.
References llvm::TargetMachine::addPassesToEmitMC(), llvm::object::ObjectFile::createObjectFile(), llvm::inconvertibleErrorCode(), and llvm::legacy::PassManager::run().
|
inline |
Set an ObjectCache to query before compiling.
Definition at line 46 of file CompileUtils.h.