From 5433e20ec1c539bb53b47ca818f4742b403e3c23 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 19 May 2021 11:46:02 -0700 Subject: [PATCH] Mark tu_abbrev_offset::operator<() const. clang 11 with libc++'s 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 | 4 ++++ gdb/dwarf2/read.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4cc0cb8794f..d8992d48106 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2021-05-19 John Baldwin + + * dwarf2/read.c (tu_abbrev_offset::operator<): Mark const. + 2021-05-17 Tom Tromey * dwarf2/read.h: Update include. diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 8a57aeee61c..2cd8a95658a 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -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; } -- 2.30.2