thopre created this revision. thopre added reviewers: wallace, jj10306. Herald added a project: All. thopre requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
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. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D126402 Files: lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp Index: lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp =================================================================== --- lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp +++ lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp @@ -318,7 +318,7 @@ } IntelPTSingleBufferTraceUP trace_up( new IntelPTSingleBufferTrace(std::move(*perf_event), initial_state)); - return trace_up; + return std::move(trace_up); } else { return perf_event.takeError(); } Index: lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp =================================================================== --- lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp +++ lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp @@ -78,7 +78,7 @@ error = joinErrors(std::move(error), trace->TraceStart(tid)); if (error) return std::move(error); - return trace; + return std::move(trace); } Error IntelPTCollector::TraceStart(const TraceIntelPTStartRequest &request) {
Index: lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp =================================================================== --- lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp +++ lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp @@ -318,7 +318,7 @@ } IntelPTSingleBufferTraceUP trace_up( new IntelPTSingleBufferTrace(std::move(*perf_event), initial_state)); - return trace_up; + return std::move(trace_up); } else { return perf_event.takeError(); } Index: lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp =================================================================== --- lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp +++ lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp @@ -78,7 +78,7 @@ error = joinErrors(std::move(error), trace->TraceStart(tid)); if (error) return std::move(error); - return trace; + return std::move(trace); } Error IntelPTCollector::TraceStart(const TraceIntelPTStartRequest &request) {
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits