[lldb][NFC] Simplify structure parsing code in DWARFASTParserClang::ParseTypeFromDWARF

This way it looks more like the code around it. The assert is also gone as it just
checks that the variables we declare directly above were not initialized by anyone.
That made more sense when this was one large function.
This commit is contained in:
Raphael Isemann 2019-11-26 14:01:10 +01:00
parent 4023bd05fc
commit 0181338dda
1 changed files with 2 additions and 4 deletions

View File

@ -483,10 +483,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc,
case DW_TAG_structure_type: case DW_TAG_structure_type:
case DW_TAG_union_type: case DW_TAG_union_type:
case DW_TAG_class_type: { case DW_TAG_class_type: {
assert((!type_sp && !clang_type) && type_sp = ParseStructureLikeDIE(sc, die, attrs);
"Did not expect partially computed structure-like type"); break;
TypeSP struct_like_type_sp = ParseStructureLikeDIE(sc, die, attrs);
return UpdateSymbolContextScopeForType(sc, die, struct_like_type_sp);
} }
case DW_TAG_enumeration_type: { case DW_TAG_enumeration_type: {