From 5839976976bc018b674f45f56f8a13707b870443 Mon Sep 17 00:00:00 2001 From: Walter Erquinigo Date: Thu, 29 Jul 2021 19:04:27 -0700 Subject: [PATCH] [nfc][trace] use formatv instead of the old Printf It was suggested in https://reviews.llvm.org/D105741 and it makes sense. --- .../ctf/CommandObjectThreadTraceExportCTF.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp b/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp index 873eda687dd8..9e994ea829e9 100644 --- a/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp +++ b/lldb/source/Plugins/TraceExporter/ctf/CommandObjectThreadTraceExportCTF.cpp @@ -75,9 +75,11 @@ 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.AppendErrorWithFormat( - "Thread index %" PRIu64 " is out of range (valid values are 0 - %u).\n", tid, - num_threads); + result.AppendError( + llvm::formatv( + "Thread index {0} is out of range (valid values are 1 - {1}).\n", + tid, num_threads) + .str()); return false; } else { TraceHTR htr(*thread, *trace_sp->GetCursor(*thread)); -- 2.34.1