Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,16 +1019,7 @@ TypeSP DWARFASTParserClang::ParseEnum(const SymbolContext &sc,
// Declaration DIE is inserted into the type map in ParseTypeFromDWARF
}


if (TypeSystemClang::StartTagDeclarationDefinition(clang_type)) {
if (def_die.HasChildren()) {
bool is_signed = false;
enumerator_clang_type.IsIntegerType(is_signed);
ParseChildEnumerators(clang_type, is_signed,
type_sp->GetByteSize(nullptr).value_or(0), def_die);
}
TypeSystemClang::CompleteTagDeclarationDefinition(clang_type);
} else {
if (!CompleteEnumType(def_die, type_sp.get(), clang_type)) {
dwarf->GetObjectFile()->GetModule()->ReportError(
"DWARF DIE at {0:x16} named \"{1}\" was not able to start its "
"definition.\nPlease file a bug and attach the file at the "
Expand Down Expand Up @@ -2221,13 +2212,14 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die,
bool DWARFASTParserClang::CompleteEnumType(const DWARFDIE &die,
lldb_private::Type *type,
const CompilerType &clang_type) {
assert(clang_type.IsEnumerationType());

if (TypeSystemClang::StartTagDeclarationDefinition(clang_type)) {
if (die.HasChildren()) {
bool is_signed = false;
clang_type.IsIntegerType(is_signed);
ParseChildEnumerators(clang_type, is_signed,
if (die.HasChildren())
ParseChildEnumerators(clang_type,
clang_type.IsEnumerationIntegerTypeSigned(),
type->GetByteSize(nullptr).value_or(0), die);
}

TypeSystemClang::CompleteTagDeclarationDefinition(clang_type);
}
return (bool)clang_type;
Expand Down