aboutsummaryrefslogtreecommitdiff
path: root/gold/gc.h
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-02-17 10:49:41 -0500
committerRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-02-17 10:49:41 -0500
commit3a935c6cf98c47eaac4395622bfaf2ff517abd34 (patch)
tree54cc85b4de976e1853e7f2a50a9611146fad0a23 /gold/gc.h
parente0a1e121b39ac99e76b77b73cba1db40ef75c7c8 (diff)
downloadgdb-3a935c6cf98c47eaac4395622bfaf2ff517abd34.zip
gdb-3a935c6cf98c47eaac4395622bfaf2ff517abd34.tar.gz
gdb-3a935c6cf98c47eaac4395622bfaf2ff517abd34.tar.bz2
Simplify Garbage_collection::add_reference a bit.
this->section_reloc_map_[src_id] is created if it doesn't exist, so there is no point in doing a find.
Diffstat (limited to 'gold/gc.h')
-rw-r--r--gold/gc.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/gold/gc.h b/gold/gc.h
index 2db7cb9..be4a63c 100644
--- a/gold/gc.h
+++ b/gold/gc.h
@@ -109,11 +109,8 @@ class Garbage_collection
{
Section_id src_id(src_object, src_shndx);
Section_id dst_id(dst_object, dst_shndx);
- Section_ref::iterator p = this->section_reloc_map_.find(src_id);
- if (p == this->section_reloc_map_.end())
- this->section_reloc_map_[src_id].insert(dst_id);
- else
- p->second.insert(dst_id);
+ Sections_reachable& reachable = this->section_reloc_map_[src_id];
+ reachable.insert(dst_id);
}
private: