mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-03-07 13:39:43 +08:00
Currently, and abbrev_info points to a separately allocated array of attr_abbrev objects. This array is constructed in a temporary vector, then copied to the abbrev table's obstack. This patch changes abbrev_info to use the struct hack to store the objects directly, and changes abbrev_table::read to avoid an extra copy when allocating, using the "growing objects" capability of obstacks. This saves a bit of space, and also perhaps a little time. 2021-03-06 Tom Tromey <tom@tromey.com> * dwarf2/read.c (read_attribute): Make 'abbrev' const. * dwarf2/abbrev.c (abbrev_table::alloc_abbrev): Remove. (abbrev_table::read): Update. * dwarf2/abbrev.h (struct attr_abbrev): Move earlier. (struct abbrev_info): Reformat. <attrs>: Now an array. (struct abbrev_table) <alloc_abbrev>: Remove. |
||
---|---|---|
.. | ||
abbrev.c | ||
abbrev.h | ||
attribute.c | ||
attribute.h | ||
comp-unit.c | ||
comp-unit.h | ||
die.h | ||
dwz.c | ||
dwz.h | ||
expr.c | ||
expr.h | ||
frame-tailcall.c | ||
frame-tailcall.h | ||
frame.c | ||
frame.h | ||
index-cache.c | ||
index-cache.h | ||
index-common.c | ||
index-common.h | ||
index-write.c | ||
index-write.h | ||
leb.c | ||
leb.h | ||
line-header.c | ||
line-header.h | ||
loc.c | ||
loc.h | ||
macro.c | ||
macro.h | ||
read.c | ||
read.h | ||
section.c | ||
section.h | ||
stringify.c | ||
stringify.h |