diff options
author | Tom Tromey <tom@tromey.com> | 2023-03-14 16:56:38 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-08-31 12:41:02 -0600 |
commit | 911e1e795e2496e1a5315601ab89e56afcd10fb0 (patch) | |
tree | 6238e7783a5cf642c10652b3651c85768781c22a /gdb/ada-lang.c | |
parent | 8c329d5c651e671f9aa9ed87224dc9943a7f76e6 (diff) | |
download | binutils-911e1e795e2496e1a5315601ab89e56afcd10fb0.zip binutils-911e1e795e2496e1a5315601ab89e56afcd10fb0.tar.gz binutils-911e1e795e2496e1a5315601ab89e56afcd10fb0.tar.bz2 |
Add symbol::matches method
This adds symbol::matches, a wrapper for symbol_matches_domain. Most
places calling symbol_matches_domain can call this method instead,
which is a bit less wordy and also (IMO) clearer.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 7714033..cc64e09 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -6051,7 +6051,7 @@ ada_add_block_symbols (std::vector<struct block_symbol> &result, found_sym = false; for (struct symbol *sym : block_iterator_range (block, &lookup_name)) { - if (symbol_matches_domain (sym->language (), sym->domain (), domain)) + if (sym->matches (domain)) { if (sym->aclass () != LOC_UNRESOLVED) { @@ -6086,8 +6086,7 @@ ada_add_block_symbols (std::vector<struct block_symbol> &result, for (struct symbol *sym : block_iterator_range (block)) { - if (symbol_matches_domain (sym->language (), - sym->domain (), domain)) + if (sym->matches (domain)) { int cmp; |