diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-07-12 22:58:52 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-07-12 22:58:52 -0400 |
commit | 3b606f384df54adb8e70dd678cd9a4c9759e4122 (patch) | |
tree | 25ee94fcbb938ba8eae31ba258398335d32a9e18 /gdb/compile | |
parent | 064d9cb9e765b0a064a2e442df0e7bcc79f98c18 (diff) | |
download | gdb-3b606f384df54adb8e70dd678cd9a4c9759e4122.zip gdb-3b606f384df54adb8e70dd678cd9a4c9759e4122.tar.gz gdb-3b606f384df54adb8e70dd678cd9a4c9759e4122.tar.bz2 |
gdb: remove TYPE_LOW_BOUND_KIND and TYPE_HIGH_BOUND_KIND
Remove the macros, use the getters of `struct dynamic_prop` instead.
gdb/ChangeLog:
* gdbtypes.h (TYPE_LOW_BOUND_KIND,
TYPE_HIGH_BOUND_KIND): Remove. Update all callers
to use dynamic_prop::kind.
Change-Id: Icb1fc761f675bfac934209f8102392504d905c44
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile-c-symbols.c | 4 | ||||
-rw-r--r-- | gdb/compile/compile-c-types.c | 6 | ||||
-rw-r--r-- | gdb/compile/compile-cplus-types.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/gdb/compile/compile-c-symbols.c b/gdb/compile/compile-c-symbols.c index be2ca35..f4e0783 100644 --- a/gdb/compile/compile-c-symbols.c +++ b/gdb/compile/compile-c-symbols.c @@ -501,8 +501,8 @@ generate_vla_size (compile_instance *compiler, { case TYPE_CODE_RANGE: { - if (TYPE_HIGH_BOUND_KIND (type) == PROP_LOCEXPR - || TYPE_HIGH_BOUND_KIND (type) == PROP_LOCLIST) + if (type->bounds ()->high.kind () == PROP_LOCEXPR + || type->bounds ()->high.kind () == PROP_LOCLIST) { const struct dynamic_prop *prop = &type->bounds ()->high; std::string name = c_get_range_decl_name (prop); diff --git a/gdb/compile/compile-c-types.c b/gdb/compile/compile-c-types.c index 3c900a2..2b25783 100644 --- a/gdb/compile/compile-c-types.c +++ b/gdb/compile/compile-c-types.c @@ -44,15 +44,15 @@ convert_array (compile_c_instance *context, struct type *type) element_type = context->convert_type (TYPE_TARGET_TYPE (type)); - if (TYPE_LOW_BOUND_KIND (range) != PROP_CONST) + if (range->bounds ()->low.kind () != PROP_CONST) return context->plugin ().error (_("array type with non-constant" " lower bound is not supported")); if (range->bounds ()->low.const_val () != 0) return context->plugin ().error (_("cannot convert array type with " "non-zero lower bound to C")); - if (TYPE_HIGH_BOUND_KIND (range) == PROP_LOCEXPR - || TYPE_HIGH_BOUND_KIND (range) == PROP_LOCLIST) + if (range->bounds ()->high.kind () == PROP_LOCEXPR + || range->bounds ()->high.kind () == PROP_LOCLIST) { gcc_type result; diff --git a/gdb/compile/compile-cplus-types.c b/gdb/compile/compile-cplus-types.c index 4084f87..02df7ab 100644 --- a/gdb/compile/compile-cplus-types.c +++ b/gdb/compile/compile-cplus-types.c @@ -456,7 +456,7 @@ compile_cplus_convert_array (compile_cplus_instance *instance, struct type *range = type->index_type (); gcc_type element_type = instance->convert_type (TYPE_TARGET_TYPE (type)); - if (TYPE_LOW_BOUND_KIND (range) != PROP_CONST) + if (range->bounds ()->low.kind () != PROP_CONST) { const char *s = _("array type with non-constant" " lower bound is not supported"); @@ -472,8 +472,8 @@ compile_cplus_convert_array (compile_cplus_instance *instance, return instance->plugin ().error (s); } - if (TYPE_HIGH_BOUND_KIND (range) == PROP_LOCEXPR - || TYPE_HIGH_BOUND_KIND (range) == PROP_LOCLIST) + if (range->bounds ()->high.kind () == PROP_LOCEXPR + || range->bounds ()->high.kind () == PROP_LOCLIST) { if (TYPE_VECTOR (type)) { |