Skip to content

Commit 092dbfa

Browse files
authored
[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().
1 parent 22ff7c5 commit 092dbfa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,10 @@ class WrapperFunction<SPSRetTagT(SPSTagTs...)> {
503503

504504
SPSInputBuffer IB(R.data(), R.size());
505505
if (auto Err = detail::ResultDeserializer<SPSRetTagT, RetT>::deserialize(
506-
RetVal, R.data(), R.size()))
506+
RetVal, R.data(), R.size())) {
507507
SDR(std::move(Err), std::move(RetVal));
508+
return;
509+
}
508510

509511
SDR(Error::success(), std::move(RetVal));
510512
};

0 commit comments

Comments
 (0)