[Lldb-commits] [lldb] c9308cc - [nfc] improve a simple call
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 30 10:56:54 PDT 2021
Author: Walter Erquinigo
Date: 2021-07-30T10:55:48-07:00
New Revision: c9308cc219066bcca0b320b1bc64fa4d5f3aa193
URL: https://github.com/llvm/llvm-project/commit/c9308cc219066bcca0b320b1bc64fa4d5f3aa193
DIFF: https://github.com/llvm/llvm-project/commit/c9308cc219066bcca0b320b1bc64fa4d5f3aa193.diff
LOG: [nfc] improve a simple call
@jingham correctly pointed out that this call can be simplified. So
let's better do it.
Added:
Modified:
lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp b/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp
index 9e994ea829e9..919cdf46a5c0 100644
--- a/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp
+++ b/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp
@@ -75,11 +75,9 @@ bool CommandObjectThreadTraceExportCTF::DoExecute(Args &command,
const uint32_t num_threads = process->GetThreadList().GetSize();
size_t tid = m_options.m_thread_index ? *m_options.m_thread_index
: LLDB_INVALID_THREAD_ID;
- result.AppendError(
- llvm::formatv(
- "Thread index {0} is out of range (valid values are 1 - {1}).\n",
- tid, num_threads)
- .str());
+ result.AppendErrorWithFormatv(
+ "Thread index {0} is out of range (valid values are 1 - {1}).\n", tid,
+ num_threads);
return false;
} else {
TraceHTR htr(*thread, *trace_sp->GetCursor(*thread));
More information about the lldb-commits
mailing list