@@ -1020,15 +1020,7 @@ TypeSP DWARFASTParserClang::ParseEnum(const SymbolContext &sc,
10201020 }
10211021
10221022
1023- if (TypeSystemClang::StartTagDeclarationDefinition (clang_type)) {
1024- if (def_die.HasChildren ()) {
1025- bool is_signed = false ;
1026- enumerator_clang_type.IsIntegerType (is_signed);
1027- ParseChildEnumerators (clang_type, is_signed,
1028- type_sp->GetByteSize (nullptr ).value_or (0 ), def_die);
1029- }
1030- TypeSystemClang::CompleteTagDeclarationDefinition (clang_type);
1031- } else {
1023+ if (!CompleteEnumType (def_die, type_sp.get (), clang_type)) {
10321024 dwarf->GetObjectFile ()->GetModule ()->ReportError (
10331025 " DWARF DIE at {0:x16} named \" {1}\" was not able to start its "
10341026 " definition.\n Please file a bug and attach the file at the "
@@ -2222,12 +2214,10 @@ bool DWARFASTParserClang::CompleteEnumType(const DWARFDIE &die,
22222214 lldb_private::Type *type,
22232215 const CompilerType &clang_type) {
22242216 if (TypeSystemClang::StartTagDeclarationDefinition (clang_type)) {
2225- if (die.HasChildren ()) {
2226- bool is_signed = false ;
2227- clang_type.IsIntegerType (is_signed);
2228- ParseChildEnumerators (clang_type, is_signed,
2217+ if (die.HasChildren ())
2218+ ParseChildEnumerators (clang_type, clang_type.IsEnumerationIntegerTypeSigned (),
22292219 type->GetByteSize (nullptr ).value_or (0 ), die);
2230- }
2220+
22312221 TypeSystemClang::CompleteTagDeclarationDefinition (clang_type);
22322222 }
22332223 return (bool )clang_type;
0 commit comments