[Openmp-commits] [openmp] c96cba3 - [Libomptarget] Fix compilation of libomptarget with old GCC
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 3 08:49:45 PDT 2023
Author: Joseph Huber
Date: 2023-08-03T10:49:35-05:00
New Revision: c96cba3aea74fabf18cb04bff3d11cd956fd37ca
URL: https://github.com/llvm/llvm-project/commit/c96cba3aea74fabf18cb04bff3d11cd956fd37ca
DIFF: https://github.com/llvm/llvm-project/commit/c96cba3aea74fabf18cb04bff3d11cd956fd37ca.diff
LOG: [Libomptarget] Fix compilation of libomptarget with old GCC
Summary:
Older gcc can't figure out the copy elision and needs an explicit move.
Added:
Modified:
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
index 346eadbdea1e51..514c2e2e1fe148 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
@@ -715,7 +715,7 @@ GenericDeviceTy::getKernelEnvironmentForKernel(StringRef Name,
// Retrieve kernel environment object for the kernel.
GenericGlobalHandlerTy &GHandler = Plugin::get().getGlobalHandler();
if (auto Err = GHandler.readGlobalFromImage(*this, Image, KernelEnv))
- return Err;
+ return std::move(Err);
return KernelEnv.getValue();
}
More information about the Openmp-commits
mailing list