diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h --- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h @@ -58,8 +58,8 @@ using SPSSimpleExecutorMemoryManagerDeallocateSignature = shared::SPSError( shared::SPSExecutorAddr, shared::SPSSequence); -using SPSRunAsMainSignature = int64_t(shared::SPSExecutorAddr, - shared::SPSSequence); +using SPSRunAsMainSignature = shared::SPSExpected( + shared::SPSExecutorAddr, shared::SPSSequence); } // end namespace rt } // end namespace orc diff --git a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp --- a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp +++ b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp @@ -47,7 +47,7 @@ Expected SimpleRemoteEPC::runAsMain(ExecutorAddr MainFnAddr, ArrayRef Args) { - int64_t Result = 0; + Expected Result(0); if (auto Err = callSPSWrapper( RunAsMainAddr, Result, ExecutorAddr(MainFnAddr), Args)) return std::move(Err); diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/OrcRTBootstrap.cpp @@ -51,7 +51,7 @@ return WrapperFunction::handle( ArgData, ArgSize, [](ExecutorAddr MainAddr, - std::vector Args) -> int64_t { + std::vector Args) -> Expected { return runAsMain(MainAddr.toPtr(), Args); }) .release();