[Openmp-commits] [openmp] 2d58846 - [Libomptarget] Add more moves to expected conversion

Joseph Huber via Openmp-commits openmp-commits at lists.llvm.org
Fri Jan 6 07:10:05 PST 2023


Author: Joseph Huber
Date: 2023-01-06T09:09:45-06:00
New Revision: 2d588461bc662b3c82ba7626444917a24e9ce7b4

URL: https://github.com/llvm/llvm-project/commit/2d588461bc662b3c82ba7626444917a24e9ce7b4
DIFF: https://github.com/llvm/llvm-project/commit/2d588461bc662b3c82ba7626444917a24e9ce7b4.diff

LOG: [Libomptarget] Add more moves to expected conversion

Summary:
Fixes other instances of the same problem in the previous patch.

Added: 
    

Modified: 
    openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
index 3f688c9534b8..615a873c0cab 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
@@ -122,7 +122,7 @@ createModuleFromMemoryBuffer(std::unique_ptr<MemoryBuffer> &MB,
   if (!Mod)
     return make_error<StringError>("Failed to create module",
                                    inconvertibleErrorCode());
-  return Mod;
+  return std::move(Mod);
 }
 Expected<std::unique_ptr<Module>>
 createModuleFromImage(__tgt_device_image *Image, LLVMContext &Context) {
@@ -189,7 +189,7 @@ createTargetMachine(Module &M, std::string CPU, unsigned OptLevel) {
   if (!TM)
     return make_error<StringError>("Failed to create target machine",
                                    inconvertibleErrorCode());
-  return TM;
+  return std::move(TM);
 }
 
 ///


        


More information about the Openmp-commits mailing list