Mark tu_abbrev_offset::operator<() const.

clang 11 with libc++'s <algorithm> fails to match the existing
operator<() for std::less<> since the method is not marked const.

gdb/ChangeLog:

	* dwarf2/read.c (tu_abbrev_offset::operator<): Mark const.
This commit is contained in:
John Baldwin 2021-05-19 11:46:02 -07:00
parent 17bb1d80f5
commit 5433e20ec1
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2021-05-19 John Baldwin <jhb@FreeBSD.org>
* dwarf2/read.c (tu_abbrev_offset::operator<): Mark const.
2021-05-17 Tom Tromey <tom@tromey.com>
* dwarf2/read.h: Update include.

View file

@ -7116,7 +7116,7 @@ struct tu_abbrev_offset
{}
/* This is used when sorting. */
bool operator< (const tu_abbrev_offset &other)
bool operator< (const tu_abbrev_offset &other) const
{
return abbrev_offset < other.abbrev_offset;
}