From d0c9791728caa0d3b3270a997c7fd97919976c97 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 31 Jan 2023 07:52:09 -0700 Subject: Turn value_type into method This changes value_type to be a method of value. Much of this patch was written by script. Approved-By: Simon Marchi --- gdb/typeprint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/typeprint.c') diff --git a/gdb/typeprint.c b/gdb/typeprint.c index 41b5735..64709b9 100644 --- a/gdb/typeprint.c +++ b/gdb/typeprint.c @@ -515,7 +515,7 @@ whatis_exp (const char *exp, int show) any typedef level. "ptype" always strips all levels of typedefs. */ val = evaluate_type (expr.get ()); - type = value_type (val); + type = val->type (); if (show == -1 && expr->first_opcode () == OP_TYPE) { @@ -536,7 +536,7 @@ whatis_exp (const char *exp, int show) else { val = access_value_history (0); - type = value_type (val); + type = val->type (); } if (flags.print_offsets && is_dynamic_type (type)) @@ -712,7 +712,7 @@ maintenance_print_type (const char *type_name, int from_tty) { expression_up expr = parse_expression (type_name); struct value *val = evaluate_type (expr.get ()); - struct type *type = value_type (val); + struct type *type = val->type (); if (type != nullptr) recursive_dump_type (type, 0); -- cgit v1.1