mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
gdb: rename address_class -> location_class
The enum address_class and related fields and methods seem misnamed to me. Generalize it to "location_class". The enumerators in address_class are already prefixed with LOC, so the new name seems logical to me. Rename related fields and methods as well. Plus, address_class could easily be mistaken for other unrelated things named "address class" in GDB or DWARF. Tested by rebuilding. Change-Id: I0dca3738df412b350715286c608041b08e9b4d82 Approved-by: Kevin Buettner <kevinb@redhat.com>
This commit is contained in:
@@ -2678,11 +2678,11 @@ var_value_operation::evaluate_for_address (struct expression *exp,
|
||||
if (noside == EVAL_AVOID_SIDE_EFFECTS)
|
||||
{
|
||||
struct type *type = lookup_pointer_type (var->type ());
|
||||
enum address_class sym_class = var->aclass ();
|
||||
location_class loc_class = var->loc_class ();
|
||||
|
||||
if (sym_class == LOC_CONST
|
||||
|| sym_class == LOC_CONST_BYTES
|
||||
|| sym_class == LOC_REGISTER)
|
||||
if (loc_class == LOC_CONST
|
||||
|| loc_class == LOC_CONST_BYTES
|
||||
|| loc_class == LOC_REGISTER)
|
||||
error (_("Attempt to take address of register or constant."));
|
||||
|
||||
return value::zero (type, not_lval);
|
||||
|
||||
Reference in New Issue
Block a user