diff --git a/lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp b/lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp --- a/lldb/source/Plugins/Process/Linux/IntelPTCollector.cpp +++ b/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) { diff --git a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp b/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp --- a/lldb/source/Plugins/Process/Linux/IntelPTSingleBufferTrace.cpp +++ b/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(); }