summaryrefslogtreecommitdiff
path: root/gold/gc.h
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-17 11:51:36 -0400
committerRafael Ávila de Espíndola <rafael.espindola@gmail.com>2015-04-17 11:51:36 -0400
commit4277535cdc6ce6998cdc273bbe454f9ca2c23037 (patch)
treec5205ed53cb26c0b0b76a9e756b84ef48165d7a8 /gold/gc.h
parenta4ea36c6cb13d100aacab3a90762597cef471b35 (diff)
downloadbinutils-gdb-4277535cdc6ce6998cdc273bbe454f9ca2c23037.tar.gz
Use LIFO instead of FIFO to implement gc's transitive closure.
FIFO is harder to implement and has less locality than LIFO. It is also not necessary to implement a transitive closure, a LIFO works just as well.
Diffstat (limited to 'gold/gc.h')
-rw-r--r--gold/gc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/gold/gc.h b/gold/gc.h
index be4a63c5c22..bf4023dcae7 100644
--- a/gold/gc.h
+++ b/gold/gc.h
@@ -23,7 +23,6 @@
#ifndef GOLD_GC_H
#define GOLD_GC_H
-#include <queue>
#include <vector>
#include "elfcpp.h"
@@ -52,7 +51,7 @@ class Garbage_collection
typedef Unordered_set<Section_id, Section_id_hash> Sections_reachable;
typedef std::map<Section_id, Sections_reachable> Section_ref;
- typedef std::queue<Section_id> Worklist_type;
+ typedef std::vector<Section_id> Worklist_type;
// This maps the name of the section which can be represented as a C
// identifier (cident) to the list of sections that have that name.
// Different object files can have cident sections with the same name.