[Lldb-commits] [lldb] [lldb/DWARF] Don't start class definitions in ParseStructureLikeDIE (PR #96755)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 26 05:07:02 PDT 2024
================
@@ -1893,72 +1849,21 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
dwarf->GetUniqueDWARFASTTypeMap().Insert(unique_typename,
*unique_ast_entry_up);
- if (!attrs.is_forward_declaration) {
- // Always start the definition for a class type so that if the class
- // has child classes or types that require the class to be created
- // for use as their decl contexts the class will be ready to accept
- // these child definitions.
- if (!def_die.HasChildren()) {
- // No children for this struct/union/class, lets finish it
- if (TypeSystemClang::StartTagDeclarationDefinition(clang_type)) {
- TypeSystemClang::CompleteTagDeclarationDefinition(clang_type);
- } else {
- dwarf->GetObjectFile()->GetModule()->ReportError(
-
- "DWARF DIE {0:x16} named \"{1}\" was not able to start its "
- "definition.\nPlease file a bug and attach the file at the "
- "start of this error message",
- def_die.GetID(), attrs.name.GetCString());
- }
-
- // Setting authority byte size and alignment for empty structures.
- //
- // If the byte size or alignmenet of the record is specified then
- // overwrite the ones that would be computed by Clang.
- // This is only needed as LLDB's TypeSystemClang is always in C++ mode,
- // but some compilers such as GCC and Clang give empty structs a size of 0
- // in C mode (in contrast to the size of 1 for empty structs that would be
- // computed in C++ mode).
- if (attrs.byte_size || attrs.alignment) {
- clang::RecordDecl *record_decl =
- TypeSystemClang::GetAsRecordDecl(clang_type);
- if (record_decl) {
----------------
labath wrote:
These lines.
https://github.com/llvm/llvm-project/pull/96755
More information about the lldb-commits
mailing list