Skip to content

Commit 9f17599

Browse files
committed
[LLDB] Fix LLDB_LOG calls to use correct formatting
It looks like a previous change switched these from LLDB_LOGF but did not update the format strings. Differential Revision: https://reviews.llvm.org/D96550
1 parent a7ceef9 commit 9f17599

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,10 +1570,10 @@ bool ClangASTSource::layoutRecordType(const RecordDecl *record, uint64_t &size,
15701570

15711571
if (log) {
15721572
LLDB_LOG(log, "LRT returned:");
1573-
LLDB_LOG(log, "LRT Original = (RecordDecl*)%p",
1573+
LLDB_LOG(log, "LRT Original = (RecordDecl*){0}",
15741574
static_cast<const void *>(origin_record.decl));
1575-
LLDB_LOG(log, "LRT Size = %" PRId64, size);
1576-
LLDB_LOG(log, "LRT Alignment = %" PRId64, alignment);
1575+
LLDB_LOG(log, "LRT Size = {0}", size);
1576+
LLDB_LOG(log, "LRT Alignment = {0}", alignment);
15771577
LLDB_LOG(log, "LRT Fields:");
15781578
for (RecordDecl::field_iterator fi = record->field_begin(),
15791579
fe = record->field_end();

lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ bool ClangExpressionDeclMap::AddValueToStruct(const NamedDecl *decl,
350350
if (!var)
351351
return false;
352352

353-
LLDB_LOG(log, "Adding value for (NamedDecl*)%p [%s - %s] to the structure",
353+
LLDB_LOG(log, "Adding value for (NamedDecl*){0} [{1} - {2}] to the structure",
354354
decl, name, var->GetName());
355355

356356
// We know entity->m_parser_vars is valid because we used a parser variable
@@ -752,7 +752,7 @@ void ClangExpressionDeclMap::SearchPersistenDecls(NameSearchContext &context,
752752
MaybeRegisterFunctionBody(parser_function_decl);
753753
}
754754

755-
LLDB_LOG(log, " CEDM::FEVD Found persistent decl %s", name);
755+
LLDB_LOG(log, " CEDM::FEVD Found persistent decl {0}", name);
756756

757757
context.AddNamedDecl(parser_named_decl);
758758
}

0 commit comments

Comments
 (0)