[Openmp-commits] [openmp] 75c0359 - [Libomptarget] Add move to expected conversion

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


Author: Joseph Huber
Date: 2023-01-06T09:09:45-06:00
New Revision: 75c03596b86dc6950aae7d303f922be0ee6187f6

URL: https://github.com/llvm/llvm-project/commit/75c03596b86dc6950aae7d303f922be0ee6187f6
DIFF: https://github.com/llvm/llvm-project/commit/75c03596b86dc6950aae7d303f922be0ee6187f6.diff

LOG: [Libomptarget] Add move to expected conversion

Summary:
These implicit conversions from move-only types to expected seem to only
work with newer compilers. This should hopefully fix it.

Added: 
    

Modified: 
    openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
index 774a03474dd02..19808eb2d535d 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.h
@@ -386,7 +386,7 @@ struct GenericDeviceTy : public DeviceAllocatorTy {
   /// Post processing after jit backend. The ownership of \p MB will be taken.
   virtual Expected<std::unique_ptr<MemoryBuffer>>
   doJITPostProcessing(std::unique_ptr<MemoryBuffer> MB) const {
-    return MB;
+    return std::move(MB);
   }
 
 private:


        


More information about the Openmp-commits mailing list