aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-03-31 12:43:56 -0600
committerTom Tromey <tom@tromey.com>2018-04-05 07:39:37 -0600
commit9b2f85815c57d2eb4322a3d87464b5686cdbb391 (patch)
treea2a2fec1a5e608122aa6232fffba1008139a6ed6 /gdb/utils.c
parent459a2e4ccf9aadfba9819facba1c9be5297c1625 (diff)
downloadbinutils-9b2f85815c57d2eb4322a3d87464b5686cdbb391.zip
binutils-9b2f85815c57d2eb4322a3d87464b5686cdbb391.tar.gz
binutils-9b2f85815c57d2eb4322a3d87464b5686cdbb391.tar.bz2
More use of std::vector in linespec.c
This changes some spots in linespec.c to take a std::vector. This patch spilled out to objc-lang.c a bit as well. This change allows for the removal of some cleanups. ChangeLog 2018-04-05 Tom Tromey <tom@tromey.com> * utils.c (compare_strings): Remove. * utils.h (compare_strings): Remove. * objc-lang.h (find_imps): Update. * objc-lang.c (find_methods): Take a std::vector. (uniquify_strings, find_imps): Likewise. * linespec.c (find_methods): Take a std::vector. (decode_objc): Use std::vector. (add_all_symbol_names_from_pspace, find_superclass_methods): Take a std::vector. (find_method, find_function_symbols): Use std::vector.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r--gdb/utils.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/gdb/utils.c b/gdb/utils.c
index bd7553e..df0a2ce 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -2937,17 +2937,6 @@ compare_positive_ints (const void *ap, const void *bp)
return * (int *) ap - * (int *) bp;
}
-/* String compare function for qsort. */
-
-int
-compare_strings (const void *arg1, const void *arg2)
-{
- const char **s1 = (const char **) arg1;
- const char **s2 = (const char **) arg2;
-
- return strcmp (*s1, *s2);
-}
-
#define AMBIGUOUS_MESS1 ".\nMatching formats:"
#define AMBIGUOUS_MESS2 \
".\nUse \"set gnutarget format-name\" to specify the format."