aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-param.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-04-24 16:01:46 -0400
committerSimon Marchi <simon.marchi@efficios.com>2025-04-29 15:54:13 -0400
commit605b4e6f36615974635a17eed999c8ee34821e92 (patch)
treea53b3d63af077885162ce7babbed4ada5e577089 /gdb/python/py-param.c
parent28f15782adab4e8f984c065e0c793c716dd942f2 (diff)
downloadbinutils-605b4e6f36615974635a17eed999c8ee34821e92.zip
binutils-605b4e6f36615974635a17eed999c8ee34821e92.tar.gz
binutils-605b4e6f36615974635a17eed999c8ee34821e92.tar.bz2
gdb/dwarf: avoid cutu_reader moves
In process_psymtab_comp_unit and ensure_cu_exists, we create a temporary cutu_reader on the stack, then move it to a heap allocated cutu_reader once we confirmed the unit is not dummy. I think it's unnecessary to create a temporary cutu_reader. The only downside of not doing so is that if it ends up that the CU is dummy, we made an allocation/deallocation for nothing. Dummy CUs are a rare thing, it shouldn't change anything. This allows removing the cutu_reader move constructor. Change-Id: I44742d471c495055ee46db41c0e7bdfbd2d5c0b7 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-param.c')
0 files changed, 0 insertions, 0 deletions