ada-lang.c: Rename function base_type into get_base_type

This avoids shadowing issues with variables named base_type.

gdb/ChangeLog:

        * ada-lang.c (get_base_type): Renames base_type.  Adjust all
        calls throughout this file.
This commit is contained in:
Joel Brobecker 2011-11-23 19:21:12 +00:00
parent 1fc7b5d725
commit 18af828477
2 changed files with 12 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2011-11-23 Joel Brobecker <brobecker@adacore.com>
* ada-lang.c (get_base_type): Renames base_type. Adjust all
calls throughout this file.
2011-11-23 Joel Brobecker <brobecker@adacore.com> 2011-11-23 Joel Brobecker <brobecker@adacore.com>
* gdb-dlfcn.c (gdb_dlopen): Add missing coma in call to * gdb-dlfcn.c (gdb_dlopen): Add missing coma in call to

View file

@ -716,7 +716,7 @@ ada_discrete_type_low_bound (struct type *type)
non-range scalar type. */ non-range scalar type. */
static struct type * static struct type *
base_type (struct type *type) get_base_type (struct type *type)
{ {
while (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE) while (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE)
{ {
@ -3325,13 +3325,13 @@ return_match (struct type *func_type, struct type *context_type)
return 1; return 1;
if (TYPE_CODE (func_type) == TYPE_CODE_FUNC) if (TYPE_CODE (func_type) == TYPE_CODE_FUNC)
return_type = base_type (TYPE_TARGET_TYPE (func_type)); return_type = get_base_type (TYPE_TARGET_TYPE (func_type));
else else
return_type = base_type (func_type); return_type = get_base_type (func_type);
if (return_type == NULL) if (return_type == NULL)
return 1; return 1;
context_type = base_type (context_type); context_type = get_base_type (context_type);
if (TYPE_CODE (return_type) == TYPE_CODE_ENUM) if (TYPE_CODE (return_type) == TYPE_CODE_ENUM)
return context_type == NULL || return_type == context_type; return context_type == NULL || return_type == context_type;
@ -8500,8 +8500,8 @@ ada_value_binop (struct value *arg1, struct value *arg2, enum exp_opcode op)
arg1 = coerce_ref (arg1); arg1 = coerce_ref (arg1);
arg2 = coerce_ref (arg2); arg2 = coerce_ref (arg2);
type1 = base_type (ada_check_typedef (value_type (arg1))); type1 = get_base_type (ada_check_typedef (value_type (arg1)));
type2 = base_type (ada_check_typedef (value_type (arg2))); type2 = get_base_type (ada_check_typedef (value_type (arg2)));
if (TYPE_CODE (type1) != TYPE_CODE_INT if (TYPE_CODE (type1) != TYPE_CODE_INT
|| TYPE_CODE (type2) != TYPE_CODE_INT) || TYPE_CODE (type2) != TYPE_CODE_INT)
@ -10453,7 +10453,7 @@ ada_is_range_type_name (const char *name)
int int
ada_is_modular_type (struct type *type) ada_is_modular_type (struct type *type)
{ {
struct type *subranged_type = base_type (type); struct type *subranged_type = get_base_type (type);
return (subranged_type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE return (subranged_type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE
&& TYPE_CODE (subranged_type) == TYPE_CODE_INT && TYPE_CODE (subranged_type) == TYPE_CODE_INT