aboutsummaryrefslogtreecommitdiff
path: root/gold/gc.cc
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-06 15:39:42 -0400
committerRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-06 15:39:42 -0400
commit9dbb4b021df7015ab7a7dee40e30f72470afde6b (patch)
tree885c132536a0bd5ef9aa02d4021828ec7dba5e19 /gold/gc.cc
parentdae148f3b925ba75459caec099932e31a1ad961b (diff)
downloadgdb-9dbb4b021df7015ab7a7dee40e30f72470afde6b.zip
gdb-9dbb4b021df7015ab7a7dee40e30f72470afde6b.tar.gz
gdb-9dbb4b021df7015ab7a7dee40e30f72470afde6b.tar.bz2
Avoid a copy constructor call.
Diffstat (limited to 'gold/gc.cc')
-rw-r--r--gold/gc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/gc.cc b/gold/gc.cc
index 843b2b8..95867c4 100644
--- a/gold/gc.cc
+++ b/gold/gc.cc
@@ -53,9 +53,10 @@ Garbage_collection::do_transitive_closure()
this->section_reloc_map().find(entry);
if (find_it == this->section_reloc_map().end())
continue;
- Garbage_collection::Sections_reachable v = find_it->second;
+ const Garbage_collection::Sections_reachable &v = find_it->second;
// Scan the vector of references for each work_list entry.
- for (Garbage_collection::Sections_reachable::iterator it_v = v.begin();
+ for (Garbage_collection::Sections_reachable::const_iterator it_v =
+ v.begin();
it_v != v.end();
++it_v)
{