summaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-03-20 12:00:01 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-03-20 12:00:01 -0500
commitad9f751a6e9085d45d7c33877f4a5185463c617f (patch)
treee8bc70427f8cab4bcca166b90c3b36c5e8149f46 /openmp
parentedc03550063ce1c39bb47bf94937cf036359b487 (diff)
downloadllvm-ad9f751a6e9085d45d7c33877f4a5185463c617f.tar.gz
[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.
Diffstat (limited to 'openmp')
-rw-r--r--openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp2
1 files changed, 1 insertions, 1 deletions
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.