aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2025-03-20 08:52:35 -0600
committerTom Tromey <tromey@adacore.com>2025-04-24 13:25:08 -0600
commitc2de2f7ed5904c1f8fdca596536616f71c5d2521 (patch)
treeb8dd133c86e4ab54c4836892b00ebb03fcd9e27b /gdb
parent2b6e074017c8a08c750af3b6ab1e10eeb70153a2 (diff)
downloadbinutils-c2de2f7ed5904c1f8fdca596536616f71c5d2521.zip
binutils-c2de2f7ed5904c1f8fdca596536616f71c5d2521.tar.gz
binutils-c2de2f7ed5904c1f8fdca596536616f71c5d2521.tar.bz2
Use bool in update_enumeration_type_from_children
This is just a small preliminary cleanup to use 'bool' in update_enumeration_type_from_children.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/dwarf2/read.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index c0f771b..a99cd4c 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -11586,8 +11586,8 @@ update_enumeration_type_from_children (struct die_info *die,
struct type *type,
struct dwarf2_cu *cu)
{
- int unsigned_enum = 1;
- int flag_enum = 1;
+ bool unsigned_enum = true;
+ bool flag_enum = true;
auto_obstack obstack;
std::vector<struct field> fields;
@@ -11615,13 +11615,13 @@ update_enumeration_type_from_children (struct die_info *die,
&value, &bytes, &baton);
if (value < 0)
{
- unsigned_enum = 0;
- flag_enum = 0;
+ unsigned_enum = false;
+ flag_enum = false;
}
else
{
if (count_one_bits_ll (value) >= 2)
- flag_enum = 0;
+ flag_enum = false;
}
struct field &field = fields.emplace_back ();
@@ -11632,7 +11632,7 @@ update_enumeration_type_from_children (struct die_info *die,
if (!fields.empty ())
type->copy_fields (fields);
else
- flag_enum = 0;
+ flag_enum = false;
if (unsigned_enum)
type->set_is_unsigned (true);