DWARFDie.cpp: Reduce indentation with early continue

This commit is contained in:
David Blaikie 2021-09-18 22:22:25 -07:00
parent 6a2c2263fb
commit d2373c04a7
1 changed files with 40 additions and 39 deletions

View File

@ -128,8 +128,9 @@ struct DWARFTypePrinter {
}
void appendArrayType(const DWARFDie &D) {
for (const DWARFDie &C : D.children())
if (C.getTag() == DW_TAG_subrange_type) {
for (const DWARFDie &C : D.children()) {
if (C.getTag() != DW_TAG_subrange_type)
continue;
Optional<uint64_t> LB;
Optional<uint64_t> Count;
Optional<uint64_t> UB;
@ -143,8 +144,8 @@ struct DWARFTypePrinter {
if (Optional<DWARFFormValue> LV =
D.getDwarfUnit()->getUnitDIE().find(DW_AT_language))
if (Optional<uint64_t> LC = LV->getAsUnsignedConstant())
if ((DefaultLB = LanguageLowerBound(
static_cast<dwarf::SourceLanguage>(*LC))))
if ((DefaultLB =
LanguageLowerBound(static_cast<dwarf::SourceLanguage>(*LC))))
if (LB && *LB == *DefaultLB)
LB = None;
if (!LB && !Count && !UB)