From 809f3be12c0621cbf071c585da5638f6841c38b1 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 11 Sep 2021 13:58:04 -0600 Subject: Change pointer_type to a method of struct type I noticed that pointer_type is declared in language.h and defined in language.c. However, it really has to do with types, so it should have been in gdbtypes.h all along. This patch changes it to be a method on struct type. And, I went through uses of TYPE_IS_REFERENCE and updated many spots to use the new method as well. (I didn't update ones that were in arch-specific code, as I couldn't readily test that.) --- gdb/c-valprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/c-valprint.c') diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 9c82869..d3071d1 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -486,7 +486,7 @@ c_value_print (struct value *val, struct ui_file *stream, type = check_typedef (value_type (val)); - if (type->code () == TYPE_CODE_PTR || TYPE_IS_REFERENCE (type)) + if (type->is_pointer_or_reference ()) { struct type *original_type = value_type (val); -- cgit v1.1