gdb: change type of field_info::non_public_fields to bool
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 1 Sep 2020 01:06:06 +0000 (21:06 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 1 Sep 2020 01:06:20 +0000 (21:06 -0400)
gdb/ChangeLog:

* dwarf2/read.c (struct field_info) <non_public_fields>: Change
type to bool.
(dwarf2_add_field): Use true instead of 1.

Change-Id: I7e9c86429402c28d4f15861d17976b9c50049f94

gdb/ChangeLog
gdb/dwarf2/read.c

index 329c3517adb594f6db6670c561276e8a89885250..7aadd870423ab6cf648092d88034500fa97c0d74 100644 (file)
@@ -1,3 +1,8 @@
+2020-08-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * dwarf2/read.c (struct field_info) <non_public_fields>: Change
+       type to bool.
+
 2020-08-31  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * dwarf2/read.c (struct field_info): Fix indentation.
index fe66dd36fca426d55afa32819f28c8bdbbe5d8df..c610ae4f068dfb72951514365b8d886ac1ffacb9 100644 (file)
@@ -1196,7 +1196,7 @@ struct field_info
   std::vector<struct nextfield> baseclasses;
 
   /* Set if the accessibility of one of the fields is not public.  */
-  int non_public_fields = 0;
+  bool non_public_fields = false;
 
   /* Member function fieldlist array, contains name of possibly overloaded
      member function, number of overloaded member functions and a pointer
@@ -15015,7 +15015,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
   else
     new_field->accessibility = dwarf2_default_access_attribute (die, cu);
   if (new_field->accessibility != DW_ACCESS_public)
-    fip->non_public_fields = 1;
+    fip->non_public_fields = true;
 
   attr = dwarf2_attr (die, DW_AT_virtuality, cu);
   if (attr != nullptr)
@@ -15112,7 +15112,7 @@ dwarf2_add_field (struct field_info *fip, struct die_info *die,
        {
          FIELD_ARTIFICIAL (*fp) = 1;
          new_field->accessibility = DW_ACCESS_private;
-         fip->non_public_fields = 1;
+         fip->non_public_fields = true;
        }
     }
   else if (die->tag == DW_TAG_member || die->tag == DW_TAG_variable)
This page took 0.086599 seconds and 4 git commands to generate.