diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-04-01 21:10:09 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-04-01 21:10:09 -0400 |
commit | 0672875f3c7c03580ed88dfa48c2e3a3b16d0697 (patch) | |
tree | 7339ddf8868b8d0a0b9a0f7b795c4e1e984f5722 | |
parent | 9902b327931538037f59f9acbb80fd6097f2777a (diff) | |
download | gdb-0672875f3c7c03580ed88dfa48c2e3a3b16d0697.zip gdb-0672875f3c7c03580ed88dfa48c2e3a3b16d0697.tar.gz gdb-0672875f3c7c03580ed88dfa48c2e3a3b16d0697.tar.bz2 |
gdb: remove TYPE_FLAG_ENUM
gdb/ChangeLog:
* gdbtypes.h (TYPE_FLAG_ENUM): Remove, replace all uses
with type::is_flag_enum.
Change-Id: I74e23893066eecd6df641045b859a6d6ebb13dd0
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 2 | ||||
-rw-r--r-- | gdb/valprint.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1bd2f13..1bdd652 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2021-04-01 Simon Marchi <simon.marchi@efficios.com> + * gdbtypes.h (TYPE_FLAG_ENUM): Remove, replace all uses + with type::is_flag_enum. + +2021-04-01 Simon Marchi <simon.marchi@efficios.com> + * gdbtypes.h (struct type) <is_flag_enum, set_is_flag_enum>: New methods. (TYPE_FLAG_ENUM): Use type::is_flag_enum, change all diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 52c17532..bb4d26e 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -220,8 +220,6 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags); #define TYPE_NOTTEXT(t) (((t)->instance_flags ()) & TYPE_INSTANCE_FLAG_NOTTEXT) -#define TYPE_FLAG_ENUM(t) ((t)->is_flag_enum ()) - /* * Constant type. If this is set, the corresponding type has a const modifier. */ diff --git a/gdb/valprint.c b/gdb/valprint.c index baf50f7..654552a 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -616,7 +616,7 @@ generic_val_print_enum_1 (struct type *type, LONGEST val, fputs_styled (TYPE_FIELD_NAME (type, i), variable_name_style.style (), stream); } - else if (TYPE_FLAG_ENUM (type)) + else if (type->is_flag_enum ()) { int first = 1; |