From d91e9ea81dce83259f2a7f32f43876373f3e7981 Mon Sep 17 00:00:00 2001 From: Xavier Roirand Date: Mon, 10 Sep 2018 10:35:58 -0500 Subject: (Ada) Cleanup code by using ada_is_access_to_unconstrained_array call. This patch just avoids code duplication by using a function we introduced recently (ada_is_access_to_unconstrained_array). gdb/ChangeLog: * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static declaration. * ada-lang.h: add ada_is_access_to_unconstrained_array prototype. * ada-varobj.c (ada_varobj_get_number_of_children, ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code. Tested on x86_64-linux. No new testcase provided, as this is just a refactoring. --- gdb/ada-lang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 5f39def2092..d151dde3a29 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2834,7 +2834,7 @@ value_assign_to_component (struct value *container, struct value *component, /* Determine if TYPE is an access to an unconstrained array. */ -static bool +bool ada_is_access_to_unconstrained_array (struct type *type) { return (TYPE_CODE (type) == TYPE_CODE_TYPEDEF -- cgit v1.2.1