[Openmp-commits] [openmp] 54b54d6 - [OpenMP] Fix compile error caused by #74397 (#75419)
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Dec 15 05:15:57 PST 2023
Author: Shilei Tian
Date: 2023-12-15T08:15:52-05:00
New Revision: 54b54d63caa8b672cbc97fe291ad1b4e4f5895a6
URL: https://github.com/llvm/llvm-project/commit/54b54d63caa8b672cbc97fe291ad1b4e4f5895a6
DIFF: https://github.com/llvm/llvm-project/commit/54b54d63caa8b672cbc97fe291ad1b4e4f5895a6.diff
LOG: [OpenMP] Fix compile error caused by #74397 (#75419)
This patch fixed the following compile error caused by #74397.
```
openmp/libomptarget/src/PluginManager.cpp: In static member function ‘static llvm::Expected<std::unique_ptr<PluginAdaptorTy> >
PluginAdaptorTy::create(const string&)’:
openmp/libomptarget/src/PluginManager.cpp:50:10: error: could not convert ‘PluginAdaptor’ from ‘std::unique_ptr<PluginAdaptorTy
>’ to ‘llvm::Expected<std::unique_ptr<PluginAdaptorTy> >’
return PluginAdaptor; ^~~~~~~~~~~~~
```
Added:
Modified:
openmp/libomptarget/src/PluginManager.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/src/PluginManager.cpp b/openmp/libomptarget/src/PluginManager.cpp
index 17787284441c55..34a0d1dcefa526 100644
--- a/openmp/libomptarget/src/PluginManager.cpp
+++ b/openmp/libomptarget/src/PluginManager.cpp
@@ -47,7 +47,7 @@ PluginAdaptorTy::create(const std::string &Name) {
new PluginAdaptorTy(Name, std::move(LibraryHandler)));
if (auto Err = PluginAdaptor->init())
return Err;
- return PluginAdaptor;
+ return std::move(PluginAdaptor);
}
PluginAdaptorTy::PluginAdaptorTy(const std::string &Name,
More information about the Openmp-commits
mailing list