[Lldb-commits] [lldb] [lldb][intel-pt] Fix build error on conversion from llvm::Error to Status::FromError (PR #108719)

via lldb-commits lldb-commits at lists.llvm.org
Sat Sep 14 14:55:49 PDT 2024


https://github.com/kusmour created https://github.com/llvm/llvm-project/pull/108719

Summary: This introduced from upstream [#107163](https://github.com/llvm/llvm-project/pull/107163)

Test Plan: I can build

>From ff2f26081b5535587e5ccb28522b728a596b6e12 Mon Sep 17 00:00:00 2001
From: Wanyi Ye <wanyi at meta.com>
Date: Sat, 14 Sep 2024 14:23:01 -0700
Subject: [PATCH] [lldb][intel-pt] Fix build error on conversion from
 llvm::Error to Status::FromError

Summary: This introduced from upstream #107163

Test Plan: I can build
---
 .../Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
 }



More information about the lldb-commits mailing list