From 0181338ddae26230d4067fdc00c2f7218f1d64d7 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Tue, 26 Nov 2019 14:01:10 +0100 Subject: [PATCH] [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. --- lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 8ead4ea..78c5af4 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -483,10 +483,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc, case DW_TAG_structure_type: case DW_TAG_union_type: case DW_TAG_class_type: { - assert((!type_sp && !clang_type) && - "Did not expect partially computed structure-like type"); - TypeSP struct_like_type_sp = ParseStructureLikeDIE(sc, die, attrs); - return UpdateSymbolContextScopeForType(sc, die, struct_like_type_sp); + type_sp = ParseStructureLikeDIE(sc, die, attrs); + break; } case DW_TAG_enumeration_type: { -- 2.7.4