[llvm] 092dbfa - [Orc] Fix error handling (#95253)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 23:24:32 PDT 2024
Author: Nikita Popov
Date: 2024-06-13T08:24:28+02:00
New Revision: 092dbfaad257885692fa64559e9eb43a5c466798
URL: https://github.com/llvm/llvm-project/commit/092dbfaad257885692fa64559e9eb43a5c466798
DIFF: https://github.com/llvm/llvm-project/commit/092dbfaad257885692fa64559e9eb43a5c466798.diff
LOG: [Orc] Fix error handling (#95253)
I believe we should return after the SDR for the error case, instead of
invoking it a second time with Error::success().
Added:
Modified:
llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
index bdb5ac143c34a..2521bda0b42cf 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
@@ -503,8 +503,10 @@ class WrapperFunction<SPSRetTagT(SPSTagTs...)> {
SPSInputBuffer IB(R.data(), R.size());
if (auto Err = detail::ResultDeserializer<SPSRetTagT, RetT>::deserialize(
- RetVal, R.data(), R.size()))
+ RetVal, R.data(), R.size())) {
SDR(std::move(Err), std::move(RetVal));
+ return;
+ }
SDR(Error::success(), std::move(RetVal));
};
More information about the llvm-commits
mailing list