Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gcc 75 libomptarget type convert #75562

Conversation

SunilKuravinakop
Copy link
Contributor

When building with gcc-7.5 we get the error:
nochange/openmp/libomptarget/src/PluginManager.cpp: In static member function 'static llvm::Expected<std::unique_ptr<PluginAdaptorTy> > PluginAdaptorTy::create(const string&)':
To overcome this an std::move has been added to convert from
std::unique_ptr<PluginAdaptorTy> to Expected<std::unique_ptr<PluginAdaptorTy>>
This problem does not occur in higher versions of the compiler like gcc-12.2

Sunil Kuravinakop added 3 commits December 14, 2023 04:09
@llvmbot llvmbot added the openmp:libomptarget OpenMP offload runtime label Dec 15, 2023
@@ -47,7 +47,9 @@ PluginAdaptorTy::create(const std::string &Name) {
new PluginAdaptorTy(Name, std::move(LibraryHandler)));
if (auto Err = PluginAdaptor->init())
return Err;
return PluginAdaptor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does putting std::move here not work?

@shiltian
Copy link
Contributor

FYI: #75419

@SunilKuravinakop
Copy link
Contributor Author

Since this has been done in #75419 with the change suggested by Joseph Huber, I am closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomptarget OpenMP offload runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants