[Lldb-commits] [lldb] 0181338 - [lldb][NFC] Simplify structure parsing code in DWARFASTParserClang::ParseTypeFromDWARF
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 26 05:03:38 PST 2019
Author: Raphael Isemann
Date: 2019-11-26T14:01:12+01:00
New Revision: 0181338ddae26230d4067fdc00c2f7218f1d64d7
URL: https://github.com/llvm/llvm-project/commit/0181338ddae26230d4067fdc00c2f7218f1d64d7
DIFF: https://github.com/llvm/llvm-project/commit/0181338ddae26230d4067fdc00c2f7218f1d64d7.diff
LOG: [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.
Added:
Modified:
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 8ead4ea4f519..78c5af482191 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: {
More information about the lldb-commits
mailing list