diff options
author | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-18 18:13:18 +0000 |
---|---|---|
committer | tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-18 18:13:18 +0000 |
commit | 9969c043bba2c5ac03c9227ef7d476a2b8dd9c84 (patch) | |
tree | 371c9ad12b94f56f0112c4fda736391f1925a309 /libcc1 | |
parent | 64df2aeef45bf2234bfe8e6e9da264d426764fdd (diff) | |
download | gcc-9969c043bba2c5ac03c9227ef7d476a2b8dd9c84.tar.gz |
remove need for store_values_directly
This switches all hash_table users to use the layout that stores
elements of type value_type in the hash table instead of the one storing
value_type *. Since it becomes unused support for the value_type *
layout is removed.
gcc/
* hash-table.h: Remove version of hash_table that stored value_type *.
* asan.c, attribs.c, bitmap.c, cfg.c, cgraph.h, config/arm/arm.c,
config/i386/winnt.c, config/ia64/ia64.c, config/mips/mips.c,
config/sol2.c, coverage.c, cselib.c, dse.c, dwarf2cfi.c,
dwarf2out.c, except.c, gcse.c, genmatch.c, ggc-common.c,
gimple-ssa-strength-reduction.c, gimplify.c, haifa-sched.c,
hard-reg-set.h, hash-map.h, hash-set.h, ipa-devirt.c, ipa-icf.h,
ipa-profile.c, ira-color.c, ira-costs.c, loop-invariant.c,
loop-iv.c, loop-unroll.c, lto-streamer.h, plugin.c, postreload-gcse.c,
reginfo.c, statistics.c, store-motion.c, trans-mem.c, tree-cfg.c,
tree-eh.c, tree-hasher.h, tree-into-ssa.c, tree-parloops.c,
tree-sra.c, tree-ssa-coalesce.c, tree-ssa-dom.c, tree-ssa-live.c,
tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-phiopt.c,
tree-ssa-pre.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c,
tree-ssa-structalias.c, tree-ssa-tail-merge.c,
tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vectorizer.h,
valtrack.h, var-tracking.c, vtable-verify.c, vtable-verify.h: Adjust.
libcc1/
* plugin.cc: Adjust for hash_table changes.
gcc/java/
* jcf-io.c: Adjust for hash_table changes.
gcc/lto/
* lto.c: Adjust for hash_table changes.
gcc/objc/
* objc-act.c: Adjust for hash_table changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222213 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcc1')
-rw-r--r-- | libcc1/ChangeLog | 4 | ||||
-rw-r--r-- | libcc1/plugin.cc | 24 |
2 files changed, 16 insertions, 12 deletions
diff --git a/libcc1/ChangeLog b/libcc1/ChangeLog index 100e115006c..ed43b6396c7 100644 --- a/libcc1/ChangeLog +++ b/libcc1/ChangeLog @@ -1,3 +1,7 @@ +2015-04-18 Trevor Saunders <tsaunders@mozilla.com> + + * plugin.cc: Adjust for hash_table changes. + 2015-04-15 Andreas Schwab <schwab@suse.de> PR bootstrap/65763 diff --git a/libcc1/plugin.cc b/libcc1/plugin.cc index c4caf05907b..74a7ec3782c 100644 --- a/libcc1/plugin.cc +++ b/libcc1/plugin.cc @@ -113,38 +113,38 @@ struct decl_addr_value struct decl_addr_hasher : typed_free_remove<decl_addr_value> { - typedef decl_addr_value value_type; - typedef decl_addr_value compare_type; + typedef decl_addr_value *value_type; + typedef decl_addr_value *compare_type; - static inline hashval_t hash (const value_type *); - static inline bool equal (const value_type *, const compare_type *); + static inline hashval_t hash (const decl_addr_value *); + static inline bool equal (const decl_addr_value *, const decl_addr_value *); }; inline hashval_t -decl_addr_hasher::hash (const value_type *e) +decl_addr_hasher::hash (const decl_addr_value *e) { return IDENTIFIER_HASH_VALUE (DECL_NAME (e->decl)); } inline bool -decl_addr_hasher::equal (const value_type *p1, const compare_type *p2) +decl_addr_hasher::equal (const decl_addr_value *p1, const decl_addr_value *p2) { return p1->decl == p2->decl; } -struct string_hasher : typed_noop_remove<char> +struct string_hasher : typed_noop_remove<const char> { - typedef char value_type; - typedef char compare_type; + typedef const char *value_type; + typedef const char *compare_type; - static inline hashval_t hash (const value_type *s) + static inline hashval_t hash (const char *s) { return htab_hash_string (s); } - static inline bool equal (const value_type *p1, const value_type *p2) + static inline bool equal (const char *p1, const char *p2) { return strcmp (p1, p2) == 0; } @@ -210,7 +210,7 @@ private: // Add a file name to FILE_NAMES and return the canonical copy. const char *intern_filename (const char *filename) { - char **slot = file_names.find_slot (filename, INSERT); + const char **slot = file_names.find_slot (filename, INSERT); if (*slot == NULL) { /* The file name must live as long as the line map, which |