From 79e052eafd9d4cf37eece125033771391b1e71b7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 28 Nov 2007 18:01:06 +0000 Subject: From Craig Silverstein: Better handling of ODR violations which are not in a function. --- gold/dwarf_reader.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'gold/dwarf_reader.h') diff --git a/gold/dwarf_reader.h b/gold/dwarf_reader.h index 4ce65b0..48ded84 100644 --- a/gold/dwarf_reader.h +++ b/gold/dwarf_reader.h @@ -38,6 +38,19 @@ template class Track_relocs; struct LineStateMachine; +// We can't do better than to keep the offsets in a sorted vector. +// Here, offset is the key, and file_num/line_num is the value. +struct Offset_to_lineno_entry +{ + off_t offset; + int header_num; // which file-list to use (i.e. which .o file are we in) + int file_num; // a pointer into files_ + int line_num; // the line number in the source file + // Offsets are unique within a section, so that's a sufficient sort key. + bool operator<(const Offset_to_lineno_entry& that) const + { return this->offset < that.offset; } +}; + // This class is used to read the line information from the debugging // section of an object file. @@ -173,18 +186,6 @@ class Sized_dwarf_line_info : public Dwarf_line_info Reloc_map; Reloc_map reloc_map_; - // We can't do better than to keep the offsets in a sorted vector. - // Here, offset is the key, and file_num/line_num is the value. - struct Offset_to_lineno_entry - { - off_t offset; - int header_num; // which file-list to use (i.e. which .o file are we in) - int file_num; // a pointer into files_ - int line_num; // the line number in the source file - // Offsets are unique within a section, so that's a sufficient sort key. - bool operator<(const Offset_to_lineno_entry& that) const - { return this->offset < that.offset; } - }; // We have a vector of offset->lineno entries for every input section. typedef Unordered_map > Lineno_map; -- cgit v1.1