aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2018-12-28 03:43:41 +0000
committerTom de Vries <vries@gcc.gnu.org>2018-12-28 03:43:41 +0000
commitd9aa0961ea1b37aa2159761b147e9668422925ba (patch)
treed8f22fb7f9f03de37f2adc91fb45badba377d6b3 /gcc
parent40b8d3b2536246b7449b6c7ce7a972537e5f11e1 (diff)
downloadgcc-d9aa0961ea1b37aa2159761b147e9668422925ba.zip
gcc-d9aa0961ea1b37aa2159761b147e9668422925ba.tar.gz
gcc-d9aa0961ea1b37aa2159761b147e9668422925ba.tar.bz2
[libbacktrace] Simplify memory management in build_address_map
In the main loop in build_address_map, we first read the abbrevs into a local variable abbrevs, and then allocate the corresponding unit, after which we assign the abbrevs to the unit. This results in dedicated free-upon-failure handling for the variable, and extra code to make sure that free-upon-failure doesn't trigger once the unit has taken ownership of the abbrevs. Simplify this by reversing the order of abbrev reading and unit allocation, and eliminating the abbrevs local variable. Bootstrapped and reg-tested on x86_64. 2018-12-28 Tom de Vries <tdevries@suse.de> * dwarf.c (build_address_map): Simplify by removing local variable abbrevs. From-SVN: r267444
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions