Skip to content

Commit 6663df3

Browse files
committed
[OpenMP][NFC] Remove std::move to silence warnings
1 parent 3e6ae77 commit 6663df3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,20 +2700,20 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
27002700
// Allocate and construct the AMDGPU kernel.
27012701
AMDGPUKernelTy AMDGPUKernel(Name);
27022702
if (auto Err = AMDGPUKernel.init(*this, Image))
2703-
return std::move(Err);
2703+
return Err;
27042704

27052705
AsyncInfoWrapperTy AsyncInfoWrapper(*this, nullptr);
27062706

27072707
KernelArgsTy KernelArgs = {};
27082708
if (auto Err = AMDGPUKernel.launchImpl(*this, /*NumThread=*/1u,
27092709
/*NumBlocks=*/1ul, KernelArgs,
27102710
/*Args=*/nullptr, AsyncInfoWrapper))
2711-
return std::move(Err);
2711+
return Err;
27122712

27132713
Error Err = Plugin::success();
27142714
AsyncInfoWrapper.finalize(Err);
27152715

2716-
return std::move(Err);
2716+
return Err;
27172717
}
27182718

27192719
/// Envar for controlling the number of HSA queues per device. High number of

openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ Error GenericDeviceTy::init(GenericPluginTy &Plugin) {
719719
Error GenericDeviceTy::deinit(GenericPluginTy &Plugin) {
720720
for (DeviceImageTy *Image : LoadedImages)
721721
if (auto Err = callGlobalDestructors(Plugin, *Image))
722-
return std::move(Err);
722+
return Err;
723723

724724
if (OMPX_DebugKind.get() & uint32_t(DeviceDebugKind::AllocationTracker)) {
725725
GenericGlobalHandlerTy &GHandler = Plugin.getGlobalHandler();

openmp/libomptarget/plugins-nextgen/cuda/src/rtl.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,46 +1106,46 @@ struct CUDADeviceTy : public GenericDeviceTy {
11061106
for (auto [Name, Priority] : Funcs) {
11071107
GlobalTy FunctionAddr(Name.str(), sizeof(void *), &FunctionPtrs[Idx++]);
11081108
if (auto Err = Handler.readGlobalFromDevice(*this, Image, FunctionAddr))
1109-
return std::move(Err);
1109+
return Err;
11101110
}
11111111

11121112
// Copy the local buffer to the device.
11131113
if (auto Err = dataSubmit(GlobalPtrStart, FunctionPtrs.data(),
11141114
FunctionPtrs.size() * sizeof(void *), nullptr))
1115-
return std::move(Err);
1115+
return Err;
11161116

11171117
// Copy the created buffer to the appropriate symbols so the kernel can
11181118
// iterate through them.
11191119
GlobalTy StartGlobal(IsCtor ? "__init_array_start" : "__fini_array_start",
11201120
sizeof(void *), &GlobalPtrStart);
11211121
if (auto Err = Handler.writeGlobalToDevice(*this, Image, StartGlobal))
1122-
return std::move(Err);
1122+
return Err;
11231123

11241124
GlobalTy StopGlobal(IsCtor ? "__init_array_end" : "__fini_array_end",
11251125
sizeof(void *), &GlobalPtrStop);
11261126
if (auto Err = Handler.writeGlobalToDevice(*this, Image, StopGlobal))
1127-
return std::move(Err);
1127+
return Err;
11281128

11291129
CUDAKernelTy CUDAKernel(KernelName);
11301130

11311131
if (auto Err = CUDAKernel.init(*this, Image))
1132-
return std::move(Err);
1132+
return Err;
11331133

11341134
AsyncInfoWrapperTy AsyncInfoWrapper(*this, nullptr);
11351135

11361136
KernelArgsTy KernelArgs = {};
11371137
if (auto Err = CUDAKernel.launchImpl(*this, /*NumThread=*/1u,
11381138
/*NumBlocks=*/1ul, KernelArgs, nullptr,
11391139
AsyncInfoWrapper))
1140-
return std::move(Err);
1140+
return Err;
11411141

11421142
Error Err = Plugin::success();
11431143
AsyncInfoWrapper.finalize(Err);
11441144

11451145
if (free(Buffer, TARGET_ALLOC_DEVICE) != OFFLOAD_SUCCESS)
11461146
return Plugin::error("Failed to free memory for global buffer");
11471147

1148-
return std::move(Err);
1148+
return Err;
11491149
}
11501150

11511151
/// Stream manager for CUDA streams.

0 commit comments

Comments
 (0)