]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Mark tu_abbrev_offset::operator<() const.
authorJohn Baldwin <jhb@FreeBSD.org>
Wed, 19 May 2021 18:46:02 +0000 (11:46 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 19 May 2021 20:31:19 +0000 (13:31 -0700)
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.

gdb/ChangeLog
gdb/dwarf2/read.c

index 4cc0cb8794fb9963ac924b6d62d92a068420cfe2..d8992d481065fa61526cbb552128115d57a9d992 100644 (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.
index 8a57aeee61cabdb1686bd8d229ea3b860668e7b7..2cd8a95658a9bf8b315af83b9533cd5d22770791 100644 (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;
   }