-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[lldb][intel-pt] Fix build error on conversion from llvm::Error to Status::FromError #108719
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
Conversation
@llvm/pr-subscribers-lldb Author: Wanyi (kusmour) ChangesSummary: This introduced from upstream #107163 Test Plan: I can build Full diff: https://github.com/llvm/llvm-project/pull/108719.diff 1 Files Affected:
diff --git a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
index 81f7c228561a6d..40035e4480495f 100644
--- a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
@@ -78,7 +78,7 @@ bool CommandObjectThreadTraceStartIntelPT::DoExecuteOnThreads(
llvm::ArrayRef<lldb::tid_t> tids) {
if (Error err = m_trace.Start(tids, m_options.m_ipt_trace_size,
m_options.m_enable_tsc, m_options.m_psb_period))
- result.SetError(Status(std::move(err)));
+ result.SetError(Status::FromError(std::move(err)));
else
result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -164,7 +164,7 @@ void CommandObjectProcessTraceStartIntelPT::DoExecute(
m_options.m_ipt_trace_size, m_options.m_process_buffer_size_limit,
m_options.m_enable_tsc, m_options.m_psb_period,
m_options.m_per_cpu_tracing, m_options.m_disable_cgroup_filtering))
- result.SetError(Status(std::move(err)));
+ result.SetError(Status::FromError(std::move(err)));
else
result.SetStatus(eReturnStatusSuccessFinishResult);
}
|
@@ -78,7 +78,7 @@ bool CommandObjectThreadTraceStartIntelPT::DoExecuteOnThreads( | |||
llvm::ArrayRef<lldb::tid_t> tids) { | |||
if (Error err = m_trace.Start(tids, m_options.m_ipt_trace_size, | |||
m_options.m_enable_tsc, m_options.m_psb_period)) | |||
result.SetError(Status(std::move(err))); | |||
result.SetError(Status::FromError(std::move(err))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just make sure that you really need to invoke std::move. It's possible that the compiler can do that on its own and that you don't need the explicit std::move
…atus::FromError Summary: This introduced from upstream llvm#107163 Test Plan: I can build
ff2f260
to
9f41e2a
Compare
…atus::FromError (llvm#108719) Summary: This introduced from upstream [llvm#107163](llvm#107163) Test Plan: I can build Closes: llvm#107580
…atus::FromError (llvm#108719) Summary: This introduced from upstream [llvm#107163](llvm#107163) Test Plan: I can build Closes: llvm#107580
Summary: This introduced from upstream #107163
Test Plan: I can build
Closes: #107580