From 0672875f3c7c03580ed88dfa48c2e3a3b16d0697 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 1 Apr 2021 21:10:09 -0400 Subject: [PATCH] gdb: remove TYPE_FLAG_ENUM gdb/ChangeLog: * gdbtypes.h (TYPE_FLAG_ENUM): Remove, replace all uses with type::is_flag_enum. Change-Id: I74e23893066eecd6df641045b859a6d6ebb13dd0 --- gdb/ChangeLog | 5 +++++ gdb/gdbtypes.h | 2 -- gdb/valprint.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1bd2f138ada..1bdd652b632 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-04-01 Simon Marchi + + * gdbtypes.h (TYPE_FLAG_ENUM): Remove, replace all uses + with type::is_flag_enum. + 2021-04-01 Simon Marchi * gdbtypes.h (struct type) 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 baf50f76b60..654552aa42e 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; -- 2.30.2