Back out the last "alias" commit (search for existing alias).
It breaks the alias handling completely as the search happens way too late. So instead, just keep any possibly duplicate name as it won't be in our way anyway.
This commit is contained in:
parent
38a3af37e2
commit
452f673f38
|
@ -1239,18 +1239,12 @@ part_parm :
|
|||
mem_specs
|
||||
{
|
||||
AVRMEM * existing_mem;
|
||||
AVRMEM_ALIAS * existing_alias;
|
||||
|
||||
existing_mem = avr_locate_mem_noalias(current_part, current_mem->desc);
|
||||
if (existing_mem != NULL) {
|
||||
lrmv_d(current_part->mem, existing_mem);
|
||||
avr_free_mem(existing_mem);
|
||||
}
|
||||
existing_alias = avr_locate_memalias(current_part, current_mem->desc);
|
||||
if (existing_alias != NULL) {
|
||||
lrmv_d(current_part->mem_alias, existing_alias);
|
||||
avr_free_memalias(existing_alias);
|
||||
}
|
||||
if (is_alias) {
|
||||
avr_free_mem(current_mem); // alias mem has been already entered below
|
||||
is_alias = false;
|
||||
|
@ -1442,12 +1436,6 @@ mem_alias :
|
|||
lrmv_d(current_part->mem_alias, alias);
|
||||
avr_free_memalias(alias);
|
||||
}
|
||||
// NB: we do *not* check whether any non-alias region of the
|
||||
// same name does already exist, as that one could be pointed to
|
||||
// by an(other) alias as well. If we destroyed it, the alias
|
||||
// pointer would get stale. In case someone defines the same
|
||||
// name both as a regular memory as well as an alias, the
|
||||
// regular one will always be found first by avr_locate_mem().
|
||||
|
||||
is_alias = true;
|
||||
alias = avr_new_memalias();
|
||||
|
|
Loading…
Reference in New Issue