public inbox for archer-commits@sourceware.org help / color / mirror / Atom feed
From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] users/jkratoch/dwarf5gcc-indexcxx-debugnames: . Date: Sun, 25 Dec 2016 18:31:00 -0000 [thread overview] Message-ID: <20161225183117.129543.qmail@sourceware.org> (raw) The branch, users/jkratoch/dwarf5gcc-indexcxx-debugnames has been updated via ce01bdca631a1b5d047f29db20309437b4aa55c7 (commit) via 1ae708d7000674009569d4d1cb32d26832b8664f (commit) from 844ada9b6a5230911df26ebb692839b15c462823 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit ce01bdca631a1b5d047f29db20309437b4aa55c7 Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Sun Dec 25 19:30:54 2016 +0100 . commit 1ae708d7000674009569d4d1cb32d26832b8664f Author: Jan Kratochvil <jan.kratochvil@redhat.com> Date: Sun Dec 25 19:30:20 2016 +0100 . ----------------------------------------------------------------------- Summary of changes: gdb/dwarf2read.c | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) First 500 lines of diff: diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f3cf417..979b280 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -23193,11 +23193,22 @@ public: } }; +class IndexKey +{ +public: + int tag; + bool is_static; + IndexKey (int tag_, bool is_static_):tag(tag_), is_static (is_static_) {} + bool + operator == (const IndexKey &other) const + { + return tag == other.tag && is_static == other.is_static; + } +}; namespace std { - template<class T0,class T1> struct hash<pair<T0,T1>> { - size_t operator() (const pair<T0,T1> &key) const { - return std::hash<T0>() (key.first) - ^std::hash<T1>() (key.second); + template<> struct hash<IndexKey> { + size_t operator() (const IndexKey &key) const { + return (std::hash<int>() (key.tag) << 1) | key.is_static; } }; } @@ -23274,7 +23285,7 @@ private: DwarfTmpl<uint32_t> dwarf32; DwarfTmpl<uint64_t> dwarf64; OffsetVec &name_table_string_offs, &name_table_entry_offs; - std::unordered_map<std::pair<int, bool>, int> tag_isstatic_to_idx; + std::unordered_map<IndexKey, int> indexkey_to_idx; int idx_next = 1; DataBuf abbrev_table, entry_pool; DebugStrLookup debugstrlookup; @@ -23362,7 +23373,7 @@ public: hash_table.push_back (hash); name_table_string_offs.push_back (debugstrlookup.lookup (name.name)); name_table_entry_offs.push_back (entry_pool.size ()); - int &idx(tag_isstatic_to_idx[std::make_pair (name.tag, name.is_static)]); + int &idx (indexkey_to_idx[IndexKey (name.tag, name.is_static)]); if (!idx) { idx = idx_next++; // DW_TAG_* numerical value is used also as the value of the index tag. hooks/post-receive -- Repository for Project Archer.
next reply other threads:[~2016-12-25 18:31 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-25 18:31 jkratoch [this message] -- strict thread matches above, loose matches on Subject: below -- 2017-01-02 21:50 jkratoch 2016-12-24 23:44 jkratoch
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20161225183117.129543.qmail@sourceware.org \ --to=jkratoch@sourceware.org \ --cc=archer-commits@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).