]> sourceware.org Git - libabigail.git/commitdiff
abidw: remove always true test in resolve_declaration_only_classes
authorGiuliano Procida <gprocida@google.com>
Thu, 25 Aug 2022 11:48:55 +0000 (12:48 +0100)
committerDodji Seketeli <dodji@redhat.com>
Mon, 29 Aug 2022 11:07:09 +0000 (13:07 +0200)
The code that makes the last attempt to resolve declaration-only types
was protected by a conditional checking that the number of TUs for a
given type was more than 1. The previous branch checked for exactly 1.
However, the entire block is inside a conditional where the number of
TUs is guaranteed to be greater than 0.

Removing the conditional makes it clear that this branch handles all
remaining cases.

* src/abg-dwarf-reader.cc
(read_context::resolve_declaration_only_classes): Remove
tautological conditional.

Signed-off-by: Giuliano Procida <gprocida@google.com>
src/abg-dwarf-reader.cc

index 71c8df1c9f84db8cb666465f5d4fc3f6e9e24f04..cd34b7dbf199e48b1cc99d2144f1b8a87078b1c7 100644 (file)
@@ -4274,7 +4274,7 @@ public:
                    else if (per_tu_class_map.size() == 1)
                      (*j)->set_definition_of_declaration
                        (per_tu_class_map.begin()->second);
-                   else if (per_tu_class_map.size() > 1)
+                   else
                      {
                        // We are in case where there are more than
                        // one definition for the declaration.  Let's
This page took 0.045587 seconds and 5 git commands to generate.