Convert value_lval_const and deprecated_lval_hack to methods

This converts the value_lval_const and deprecated_lval_hack functions
to be methods on value.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-01-31 12:16:29 -07:00
parent b9f74d5432
commit 970441058c
5 changed files with 14 additions and 24 deletions

View File

@@ -458,7 +458,7 @@ fortran_associated (struct gdbarch *gdbarch, const language_defn *lang,
looking the value of the pointer itself. We make the assumption that
a non-associated pointer will be set to 0. This is probably true for
most targets, but might not be true for everyone. */
if (value_lval_const (target) != lval_memory
if (target->lval () != lval_memory
|| type_not_associated (pointer_type)
|| (TYPE_ASSOCIATED_PROP (pointer_type) == nullptr
&& pointer_type->code () == TYPE_CODE_PTR