This is an archive of the discontinued LLVM Phabricator instance.

Fix conversion error to Expected
ClosedPublic

Authored by thopre on May 25 2022, 11:41 AM.

Details

Summary

On Ubuntu 18.04 with GCC 7.5 Intel trace code fails to build due to
failure to convert from
lldb_private::process_linux::IntelPTPerThreadProcessTraceUP to
Expected<lldb_private::process_linux::IntelPTPerThreadProcessTraceUP>.
This commit explicitely marks those unique_ptr values as being moved
which fixes the conversion error.

Diff Detail

Event Timeline

thopre created this revision.May 25 2022, 11:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 11:41 AM
thopre requested review of this revision.May 25 2022, 11:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2022, 11:41 AM
wallace accepted this revision.May 25 2022, 11:56 AM

thank you!

I'm surprised the compiler didn't do this automatically

This revision is now accepted and ready to land.May 25 2022, 11:56 AM

thank you!

I'm surprised the compiler didn't do this automatically

As mentioned, this is GCC 7.5. It might be different with a newer version.

This revision was automatically updated to reflect the committed changes.