Remove type_name_no_tag and rename type_name_no_tag_or_error

type_name_no_tag is just a plain wrapper for TYPE_NAME now, so this
patch removes it.  And, because tag names no longer exist, this
renames type_name_no_tag_or_error to type_name_or_error.

gdb/ChangeLog
2018-06-01  Tom Tromey  <tom@tromey.com>

	* valops.c (value_cast_structs, destructor_name_p): Update.
	* symtab.c (gdb_mangle_name): Update.
	* stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
	Update.
	* p-valprint.c (pascal_object_is_vtbl_ptr_type)
	(pascal_object_print_value_fields, pascal_object_print_value):
	Update.
	* p-typeprint.c (pascal_type_print_derivation_info): Update.
	* linespec.c (find_methods): Update.
	* gdbtypes.h (type_name_no_tag): Remove.
	(type_name_or_error): Rename from type_name_no_tag_or_error.
	* gdbtypes.c (type_name_no_tag): Remove.
	(type_name_or_error): Rename from type_name_no_tag_or_error.
	(lookup_struct_elt_type, check_typedef): Update.
	* expprint.c (print_subexp_standard): Update.
	* dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
	* d-namespace.c (d_lookup_nested_symbol): Update.
	* cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
	(cp_print_class_member): Update.
	* cp-namespace.c (cp_lookup_nested_symbol): Update.
	* completer.c (add_struct_fields): Update.
	* c-typeprint.c (cp_type_print_derivation_info)
	(c_type_print_varspec_prefix, c_type_print_base_struct_union):
	Update.
	* ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
	(ada_prefer_type, ada_is_exception_sym): Update.
This commit is contained in:
Tom Tromey
2018-04-17 13:51:25 -06:00
parent e86ca25fd6
commit a737d952e0
17 changed files with 73 additions and 56 deletions

View File

@@ -260,7 +260,7 @@ cp_type_print_derivation_info (struct ui_file *stream,
? "public" : (TYPE_FIELD_PROTECTED (type, i)
? "protected" : "private"),
BASETYPE_VIA_VIRTUAL (type, i) ? " virtual" : "");
name = type_name_no_tag (TYPE_BASECLASS (type, i));
name = TYPE_NAME (TYPE_BASECLASS (type, i));
if (name)
print_name_maybe_canonical (name, flags, stream);
else
@@ -392,9 +392,8 @@ c_type_print_varspec_prefix (struct type *type,
case TYPE_CODE_MEMBERPTR:
c_type_print_varspec_prefix (TYPE_TARGET_TYPE (type),
stream, show, 0, 0, language, flags,
podata);
name = type_name_no_tag (TYPE_SELF_TYPE (type));
stream, show, 0, 0, language, flags, podata);
name = TYPE_NAME (TYPE_SELF_TYPE (type));
if (name)
print_name_maybe_canonical (name, flags, stream);
else
@@ -409,7 +408,7 @@ c_type_print_varspec_prefix (struct type *type,
stream, show, 0, 0, language, flags,
podata);
fprintf_filtered (stream, "(");
name = type_name_no_tag (TYPE_SELF_TYPE (type));
name = TYPE_NAME (TYPE_SELF_TYPE (type));
if (name)
print_name_maybe_canonical (name, flags, stream);
else
@@ -1380,7 +1379,7 @@ c_type_print_base_struct_union (struct type *type, struct ui_file *stream,
struct fn_field *f = TYPE_FN_FIELDLIST1 (type, i);
int j, len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
const char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
const char *name = type_name_no_tag (type);
const char *name = TYPE_NAME (type);
int is_constructor = name && strcmp (method_name,
name) == 0;