dwarf-reader: re-indent a block of code

While looking at something else, I noticed that a block of code in
compare_dies wasn't properly indented.  Fixed thus.

	* src/abg-dwarf-reader.cc (compare_dies): Properly indent a
	sub-block of the big switch case statement in there.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2020-07-29 10:27:37 +02:00
parent fd8640dc09
commit 63cfd6142c

View File

@ -11875,75 +11875,75 @@ compare_dies(const read_context& ctxt,
|| (aggregates_being_compared.find(rn) || (aggregates_being_compared.find(rn)
!= aggregates_being_compared.end())) != aggregates_being_compared.end()))
result = true; result = true;
else if (l_tag == DW_TAG_subroutine_type) else if (l_tag == DW_TAG_subroutine_type)
{ {
// The string reprs of l and r are already equal. Now let's // The string reprs of l and r are already equal. Now
// just check if they both come from the same TU. // let's just check if they both come from the same TU.
bool from_the_same_tu = false; bool from_the_same_tu = false;
if (compare_dies_cu_decl_file(l, r, from_the_same_tu) if (compare_dies_cu_decl_file(l, r, from_the_same_tu)
&& from_the_same_tu) && from_the_same_tu)
result = true; result = true;
} }
else else
{ {
if (!fn_die_equal_by_linkage_name(ctxt, l, r)) if (!fn_die_equal_by_linkage_name(ctxt, l, r))
{ {
result = false;
break;
}
if (!ctxt.die_is_in_c(l) && !ctxt.die_is_in_c(r))
{
// In C, we cannot have two different functions with the
// same linkage name in a given binary. But here we are
// looking at DIEs that don't originate from C. So we
// need to compare return types and parameter types.
Dwarf_Die l_return_type, r_return_type;
bool l_return_type_is_void = !die_die_attribute(l, DW_AT_type,
l_return_type);
bool r_return_type_is_void = !die_die_attribute(r, DW_AT_type,
r_return_type);
if (l_return_type_is_void != r_return_type_is_void
|| (!l_return_type_is_void
&& !compare_dies(ctxt,
&l_return_type, &r_return_type,
aggregates_being_compared,
update_canonical_dies_on_the_fly)))
result = false; result = false;
else break;
{ }
Dwarf_Die l_child, r_child;
bool found_l_child, found_r_child;
for (found_l_child = dwarf_child(const_cast<Dwarf_Die*>(l),
&l_child) == 0,
found_r_child = dwarf_child(const_cast<Dwarf_Die*>(r),
&r_child) == 0;
found_l_child && found_r_child;
found_l_child = dwarf_siblingof(&l_child,
&l_child) == 0,
found_r_child = dwarf_siblingof(&r_child,
&r_child)==0)
{
int l_child_tag = dwarf_tag(&l_child);
int r_child_tag = dwarf_tag(&r_child);
if (l_child_tag != r_child_tag
|| (l_child_tag == DW_TAG_formal_parameter
&& !compare_dies(ctxt, &l_child, &r_child,
aggregates_being_compared,
update_canonical_dies_on_the_fly)))
{
result = false;
break;
}
}
if (found_l_child != found_r_child)
result = false;
}
}
aggregates_being_compared.erase(ln); if (!ctxt.die_is_in_c(l) && !ctxt.die_is_in_c(r))
aggregates_being_compared.erase(rn); {
} // In C, we cannot have two different functions with the
// same linkage name in a given binary. But here we are
// looking at DIEs that don't originate from C. So we
// need to compare return types and parameter types.
Dwarf_Die l_return_type, r_return_type;
bool l_return_type_is_void = !die_die_attribute(l, DW_AT_type,
l_return_type);
bool r_return_type_is_void = !die_die_attribute(r, DW_AT_type,
r_return_type);
if (l_return_type_is_void != r_return_type_is_void
|| (!l_return_type_is_void
&& !compare_dies(ctxt,
&l_return_type, &r_return_type,
aggregates_being_compared,
update_canonical_dies_on_the_fly)))
result = false;
else
{
Dwarf_Die l_child, r_child;
bool found_l_child, found_r_child;
for (found_l_child = dwarf_child(const_cast<Dwarf_Die*>(l),
&l_child) == 0,
found_r_child = dwarf_child(const_cast<Dwarf_Die*>(r),
&r_child) == 0;
found_l_child && found_r_child;
found_l_child = dwarf_siblingof(&l_child,
&l_child) == 0,
found_r_child = dwarf_siblingof(&r_child,
&r_child)==0)
{
int l_child_tag = dwarf_tag(&l_child);
int r_child_tag = dwarf_tag(&r_child);
if (l_child_tag != r_child_tag
|| (l_child_tag == DW_TAG_formal_parameter
&& !compare_dies(ctxt, &l_child, &r_child,
aggregates_being_compared,
update_canonical_dies_on_the_fly)))
{
result = false;
break;
}
}
if (found_l_child != found_r_child)
result = false;
}
}
aggregates_being_compared.erase(ln);
aggregates_being_compared.erase(rn);
}
} }
break; break;