diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-11-29 12:05:47 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-11-29 12:13:34 +0100 |
commit | d1d6049e9d6600f28746379290705b02ffb52d4b (patch) | |
tree | 52200400ee81f84261be76ac3d3f45129018795f | |
parent | 4f000824222f97c0cfd5b19951a1068132e57e79 (diff) | |
download | bcm5719-llvm-d1d6049e9d6600f28746379290705b02ffb52d4b.tar.gz bcm5719-llvm-d1d6049e9d6600f28746379290705b02ffb52d4b.zip |
[lldb][NFC] Remove dead logging code from DWARFASTParserClang::CompleteRecordType
This code is behind a `if (log)` that is always a nullptr as the initializer
was commented out. One could uncomment the initializer code, but then this logging
code just leads to a deadlock as it tries to aquire the module lock.
This removes the logging code until I get this working again.
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 71 |
1 files changed, 1 insertions, 70 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index ba17469ea99..43030c62cb4 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -1974,8 +1974,6 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die, CompilerType &clang_type) { const dw_tag_t tag = die.Tag(); SymbolFileDWARF *dwarf = die.GetDWARF(); - Log *log = - nullptr; // (LogChannelDWARF::GetLogIfAny(DWARF_LOG_DEBUG_INFO|DWARF_LOG_TYPE_COMPLETION)); ClangASTImporter::LayoutInfo layout_info; @@ -2125,75 +2123,8 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die, clang::CXXRecordDecl *record_decl = m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType()); - if (record_decl) { - if (log) { - ModuleSP module_sp = dwarf->GetObjectFile()->GetModule(); - - if (module_sp) { - module_sp->LogMessage( - log, - "ClangASTContext::CompleteTypeFromDWARF (clang_type = %p) " - "caching layout info for record_decl = %p, bit_size = %" PRIu64 - ", alignment = %" PRIu64 - ", field_offsets[%u], base_offsets[%u], vbase_offsets[%u])", - static_cast<void *>(clang_type.GetOpaqueQualType()), - static_cast<void *>(record_decl), layout_info.bit_size, - layout_info.alignment, - static_cast<uint32_t>(layout_info.field_offsets.size()), - static_cast<uint32_t>(layout_info.base_offsets.size()), - static_cast<uint32_t>(layout_info.vbase_offsets.size())); - - uint32_t idx; - { - llvm::DenseMap<const clang::FieldDecl *, uint64_t>::const_iterator - pos, - end = layout_info.field_offsets.end(); - for (idx = 0, pos = layout_info.field_offsets.begin(); pos != end; - ++pos, ++idx) { - module_sp->LogMessage( - log, - "ClangASTContext::CompleteTypeFromDWARF (clang_type = " - "%p) field[%u] = { bit_offset=%u, name='%s' }", - static_cast<void *>(clang_type.GetOpaqueQualType()), idx, - static_cast<uint32_t>(pos->second), - pos->first->getNameAsString().c_str()); - } - } - - { - llvm::DenseMap<const clang::CXXRecordDecl *, - clang::CharUnits>::const_iterator base_pos, - base_end = layout_info.base_offsets.end(); - for (idx = 0, base_pos = layout_info.base_offsets.begin(); - base_pos != base_end; ++base_pos, ++idx) { - module_sp->LogMessage( - log, - "ClangASTContext::CompleteTypeFromDWARF (clang_type = " - "%p) base[%u] = { byte_offset=%u, name='%s' }", - clang_type.GetOpaqueQualType(), idx, - (uint32_t)base_pos->second.getQuantity(), - base_pos->first->getNameAsString().c_str()); - } - } - { - llvm::DenseMap<const clang::CXXRecordDecl *, - clang::CharUnits>::const_iterator vbase_pos, - vbase_end = layout_info.vbase_offsets.end(); - for (idx = 0, vbase_pos = layout_info.vbase_offsets.begin(); - vbase_pos != vbase_end; ++vbase_pos, ++idx) { - module_sp->LogMessage( - log, - "ClangASTContext::CompleteTypeFromDWARF (clang_type = " - "%p) vbase[%u] = { byte_offset=%u, name='%s' }", - static_cast<void *>(clang_type.GetOpaqueQualType()), idx, - static_cast<uint32_t>(vbase_pos->second.getQuantity()), - vbase_pos->first->getNameAsString().c_str()); - } - } - } - } + if (record_decl) GetClangASTImporter().InsertRecordDecl(record_decl, layout_info); - } } return (bool)clang_type; |