[Openmp-commits] [openmp] ad9f751 - [Libomptarget] Add missing explicit moves on llvm::Error
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Mon Mar 20 10:00:32 PDT 2023
Author: Joseph Huber
Date: 2023-03-20T12:00:01-05:00
New Revision: ad9f751a6e9085d45d7c33877f4a5185463c617f
URL: https://github.com/llvm/llvm-project/commit/ad9f751a6e9085d45d7c33877f4a5185463c617f
DIFF: https://github.com/llvm/llvm-project/commit/ad9f751a6e9085d45d7c33877f4a5185463c617f.diff
LOG: [Libomptarget] Add missing explicit moves on llvm::Error
Summary:
Some older compilers, which we still support, have problems handling the
copy elision that allows us to directly move an `Error` to an
`Expected`. This patch adds explicit moves to remove the error. Same as
last patch but I forgot this one.
Added:
Modified:
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
index 5a31c5362265..f9b0371f903a 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
@@ -1886,7 +1886,7 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
/* Number of accessible agents (out) */ nullptr,
/* Accessible agents */ nullptr);
if (auto Err = Plugin::check(Status, "Error in hsa_amd_pointer_info: %s"))
- return Err;
+ return std::move(Err);
// The buffer may be locked or allocated through HSA allocators. Assume that
// the buffer is host pinned if the runtime reports a HSA type.
More information about the Openmp-commits
mailing list