aboutsummaryrefslogtreecommitdiff
path: root/gold/gc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/gc.cc')
-rw-r--r--gold/gc.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/gold/gc.cc b/gold/gc.cc
index 95867c4..16bdb19 100644
--- a/gold/gc.cc
+++ b/gold/gc.cc
@@ -40,15 +40,8 @@ Garbage_collection::do_transitive_closure()
// one by one.
Section_id entry = this->worklist().front();
this->worklist().pop();
- if (this->referenced_list().find(entry)
- == this->referenced_list().end())
- {
- this->referenced_list().insert(entry);
- }
- else
- {
- continue;
- }
+ if (!this->referenced_list().insert(entry).second)
+ continue;
Garbage_collection::Section_ref::iterator find_it =
this->section_reloc_map().find(entry);
if (find_it == this->section_reloc_map().end())