Skip to content

Commit 5839976

Browse files
author
Walter Erquinigo
committed
[nfc][trace] use formatv instead of the old Printf
It was suggested in https://reviews.llvm.org/D105741 and it makes sense.
1 parent f16a4fc commit 5839976

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ bool CommandObjectThreadTraceExportCTF::DoExecute(Args &command,
7575
const uint32_t num_threads = process->GetThreadList().GetSize();
7676
size_t tid = m_options.m_thread_index ? *m_options.m_thread_index
7777
: LLDB_INVALID_THREAD_ID;
78-
result.AppendErrorWithFormat(
79-
"Thread index %" PRIu64 " is out of range (valid values are 0 - %u).\n", tid,
80-
num_threads);
78+
result.AppendError(
79+
llvm::formatv(
80+
"Thread index {0} is out of range (valid values are 1 - {1}).\n",
81+
tid, num_threads)
82+
.str());
8183
return false;
8284
} else {
8385
TraceHTR htr(*thread, *trace_sp->GetCursor(*thread));

0 commit comments

Comments
 (0)