diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2019-08-04 22:44:05 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2019-08-04 22:44:05 -0400 |
commit | 2b79f3761c834cd217407f75f867f6a761703ab3 (patch) | |
tree | 4dcf6e42276048cba74d7ffdbd15507087de63e3 /bfd/elf32-tilepro.c | |
parent | 188a63736c70060180382e36364a23dcebe3c29c (diff) | |
download | gdb-2b79f3761c834cd217407f75f867f6a761703ab3.zip gdb-2b79f3761c834cd217407f75f867f6a761703ab3.tar.gz gdb-2b79f3761c834cd217407f75f867f6a761703ab3.tar.bz2 |
Remove some variables in favor of using gdb::optional
While reading that code, I noticed that some variables essentially meant
whether to consider some other variable or not. I think using
gdb::optional (which was not available when this code was written) is
clearer, as it embeds the used/not used predicate directly in the type
of the variable, making it harder to miss.
gdb/ChangeLog:
* dwarf2read.c (struct dw2_symtab_iterator):
<want_specific_block>: Remove.
<block_index>: Change type to gdb::optional.
(dw2_symtab_iter_init): Remove WANT_SPECIFIC_BLOCK parameter,
change type of BLOCK_INDEX parameter to gdb::optional.
(dw2_symtab_iter_next): Re-write in function of gdb::optional.
(dw2_lookup_symbol): Don't pass argument for
WANT_SPECIFIC_BLOCK.
(dw2_expand_symtabs_for_function): Don't pass argument for
WANT_SPECIFIC_BLOCK, pass empty optional for BLOCK_INDEX.
(class dw2_debug_names_iterator)
<dw2_debug_names_iterator>: Remove WANT_SPECIFIC_BLOCK
parameter, change BLOCK_INDEX type to gdb::optional.
<m_want_specific_block>: Remove.
<m_block_index>: Change type to gdb::optional.
(dw2_debug_names_iterator::next): Change type of IS_STATIC to
gdb::optional. Re-write in function of gdb::optional.
(dw2_debug_names_lookup_symbol): Don't pass argument for
WANT_SPECIFIC_BLOCK.
(dw2_debug_names_expand_symtabs_for_function): Don't pass
argument for WANT_SPECIFIC_BLOCK, pass empty optional for
BLOCK_INDEX.
Diffstat (limited to 'bfd/elf32-tilepro.c')
0 files changed, 0 insertions, 0 deletions