summaryrefslogtreecommitdiff
path: root/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ExecutionEngine/Orc/IRCompileLayer.h')
-rw-r--r--include/llvm/ExecutionEngine/Orc/IRCompileLayer.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h b/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
index 99ccd4d221a5..fadd334bed0f 100644
--- a/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
+++ b/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
@@ -50,18 +50,18 @@ public:
/// along with the given memory manager and symbol resolver.
///
/// @return A handle for the added module.
- template <typename MemoryManagerPtrT, typename SymbolResolverPtrT>
- ModuleHandleT addModule(std::shared_ptr<Module> M,
- MemoryManagerPtrT MemMgr,
- SymbolResolverPtrT Resolver) {
+ Expected<ModuleHandleT>
+ addModule(std::shared_ptr<Module> M,
+ std::shared_ptr<JITSymbolResolver> Resolver) {
using CompileResult = decltype(Compile(*M));
auto Obj = std::make_shared<CompileResult>(Compile(*M));
- return BaseLayer.addObject(std::move(Obj), std::move(MemMgr),
- std::move(Resolver));
+ return BaseLayer.addObject(std::move(Obj), std::move(Resolver));
}
/// @brief Remove the module associated with the handle H.
- void removeModule(ModuleHandleT H) { BaseLayer.removeObject(H); }
+ Error removeModule(ModuleHandleT H) {
+ return BaseLayer.removeObject(H);
+ }
/// @brief Search for the given named symbol.
/// @param Name The name of the symbol to search for.
@@ -87,8 +87,8 @@ public:
/// @brief Immediately emit and finalize the module represented by the given
/// handle.
/// @param H Handle for module to emit/finalize.
- void emitAndFinalize(ModuleHandleT H) {
- BaseLayer.emitAndFinalize(H);
+ Error emitAndFinalize(ModuleHandleT H) {
+ return BaseLayer.emitAndFinalize(H);
}
private: