From 2a4a498a884ad929dad5dc72e20c76adfecfc78c Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 26 Aug 2021 11:11:00 -0700 Subject: [PATCH] [LLDB] Add type to the output for FieldDecl when logging in ClangASTSource::layoutRecordType I was debugging a problem and noticed that it would have been helpful to have the type of each FieldDecl when looking at the output from ClangASTSource::layoutRecordType. Differential Revision: https://reviews.llvm.org/D108257 --- .../Plugins/ExpressionParser/Clang/ClangASTSource.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp index 58b6b625bfeca..ae93252e55212 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp @@ -1571,8 +1571,10 @@ bool ClangASTSource::layoutRecordType(const RecordDecl *record, uint64_t &size, fe = record->field_end(); fi != fe; ++fi) { LLDB_LOG(log, - "LRT (FieldDecl*){0}, Name = '{1}', Offset = {2} bits", - *fi, fi->getName(), field_offsets[*fi]); + "LRT (FieldDecl*){0}, Name = '{1}', Type = '{2}', Offset = " + "{3} bits", + *fi, fi->getName(), fi->getType().getAsString(), + field_offsets[*fi]); } DeclFromParser parser_cxx_record = DynCast(parser_record);