diff options
Diffstat (limited to 'libcc1/plugin.cc')
-rw-r--r-- | libcc1/plugin.cc | 24 |
1 files changed, 12 insertions, 12 deletions
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 |