[12/13] Use bool in update_enumeration_type_from_children
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
Commit Message
This is just a small preliminary cleanup to use 'bool' in
update_enumeration_type_from_children.
---
gdb/dwarf2/read.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
@@ -11688,8 +11688,8 @@ update_enumeration_type_from_children (struct die_info *die,
struct dwarf2_cu *cu)
{
struct die_info *child_die;
- int unsigned_enum = 1;
- int flag_enum = 1;
+ bool unsigned_enum = true;
+ bool flag_enum = true;
auto_obstack obstack;
std::vector<struct field> fields;
@@ -11719,13 +11719,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 ();
@@ -11736,7 +11736,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);