dwarf2out.c (size_of_locs): Don't fill dw_loc_addr if there are no branches.
* dwarf2out.c (size_of_locs): Don't fill dw_loc_addr if there are no branches. From-SVN: r113267
This commit is contained in:
parent
f7acbf4c82
commit
887dc802b3
2 changed files with 18 additions and 3 deletions
|
@ -20,6 +20,9 @@
|
|||
|
||||
2006-04-25 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
* dwarf2out.c (size_of_locs): Don't fill dw_loc_addr if there
|
||||
are no branches.
|
||||
|
||||
* dwarf2asm.c (dw2_asm_output_data): Don't generate RTL just
|
||||
to print an integer.
|
||||
|
||||
|
|
|
@ -3228,12 +3228,24 @@ size_of_loc_descr (dw_loc_descr_ref loc)
|
|||
static unsigned long
|
||||
size_of_locs (dw_loc_descr_ref loc)
|
||||
{
|
||||
dw_loc_descr_ref l;
|
||||
unsigned long size;
|
||||
|
||||
for (size = 0; loc != NULL; loc = loc->dw_loc_next)
|
||||
/* If there are no skip or bra opcodes, don't fill in the dw_loc_addr
|
||||
field, to avoid writing to a PCH file. */
|
||||
for (size = 0, l = loc; l != NULL; l = l->dw_loc_next)
|
||||
{
|
||||
loc->dw_loc_addr = size;
|
||||
size += size_of_loc_descr (loc);
|
||||
if (l->dw_loc_opc == DW_OP_skip || l->dw_loc_opc == DW_OP_bra)
|
||||
break;
|
||||
size += size_of_loc_descr (l);
|
||||
}
|
||||
if (! l)
|
||||
return size;
|
||||
|
||||
for (size = 0, l = loc; l != NULL; l = l->dw_loc_next)
|
||||
{
|
||||
l->dw_loc_addr = size;
|
||||
size += size_of_loc_descr (l);
|
||||
}
|
||||
|
||||
return size;
|
||||
|
|
Loading…
Add table
Reference in a new issue