aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2023-03-07 18:24:14 -0700
committerTom Tromey <tom@tromey.com>2023-03-11 08:39:51 -0700
commit6e6ac32dde61fd3019b05adaeec372eb16c12bff (patch)
treee2d571fa24a342eeaac29d8eec2600535d7b2248 /gdb/xcoffread.c
parent1afdbb1e986157a73a7bf1cf4fa03b9426e824e8 (diff)
downloadgdb-6e6ac32dde61fd3019b05adaeec372eb16c12bff.zip
gdb-6e6ac32dde61fd3019b05adaeec372eb16c12bff.tar.gz
gdb-6e6ac32dde61fd3019b05adaeec372eb16c12bff.tar.bz2
Add operator< and operator== to linetable_entry
This adds a couple of comparison operators to linetable_entry, and simplifies both the calls to sort and one other spot that checks for equality. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 78aa953..819735d 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -439,9 +439,7 @@ arrange_linetable (std::vector<linetable_entry> &old_linetable)
if (fentries.empty ())
return;
- std::sort (fentries.begin (), fentries.end (),
- [] (const linetable_entry &lte1, const linetable_entry& lte2)
- { return lte1.pc < lte2.pc; });
+ std::sort (fentries.begin (), fentries.end ());
/* Allocate a new line table. */
std::vector<linetable_entry> new_linetable;