diff options
author | Josef Zlomek <zlomekj@suse.cz> | 2003-10-02 17:11:40 +0200 |
---|---|---|
committer | Josef Zlomek <zlomek@gcc.gnu.org> | 2003-10-02 15:11:40 +0000 |
commit | b97e92ed3a4dd394c2d764c3a78264f43050a35e (patch) | |
tree | 94553b7a0ed7cbc7f189c96d864ebd6f18dfec8f /gcc | |
parent | a08a2b75146b3b9f34692b58503126525e083429 (diff) | |
download | gcc-b97e92ed3a4dd394c2d764c3a78264f43050a35e.tar.gz |
cgraph.c (cgraph_node): Use INSERT instead of 1 in htab_find_slot_with_hash.
* cgraph.c (cgraph_node): Use INSERT instead of 1 in
htab_find_slot_with_hash.
(cgraph_node_for_identifier): Use NO_INSERT.
(cgraph_remove_node): Use NO_INSERT.
(cgraph_varpool_node): Use INSERT.
(cgraph_varpool_node_for_identifier): Use NO_INSERT.
From-SVN: r72031
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cgraph.c | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c7970165a73..3cbf6713e4f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2003-10-02 Josef Zlomek <zlomekj@suse.cz> + * cgraph.c (cgraph_node): Use INSERT instead of 1 in + htab_find_slot_with_hash. + (cgraph_node_for_identifier): Use NO_INSERT. + (cgraph_remove_node): Use NO_INSERT. + (cgraph_varpool_node): Use INSERT. + (cgraph_varpool_node_for_identifier): Use NO_INSERT. + +2003-10-02 Josef Zlomek <zlomekj@suse.cz> + Waldek Hebisch <hebisch@math.uni.wroc.pl> PR/12072 * varasm.c (compare_constant): Fix thinko. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 108cdfc7b9b..eedbd9efbef 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -106,7 +106,7 @@ cgraph_node (tree decl) slot = (struct cgraph_node **) htab_find_slot_with_hash (cgraph_hash, DECL_ASSEMBLER_NAME (decl), IDENTIFIER_HASH_VALUE - (DECL_ASSEMBLER_NAME (decl)), 1); + (DECL_ASSEMBLER_NAME (decl)), INSERT); if (*slot) return *slot; node = ggc_alloc_cleared (sizeof (*node)); @@ -142,7 +142,7 @@ cgraph_node_for_identifier (tree id) slot = (struct cgraph_node **) htab_find_slot_with_hash (cgraph_hash, id, - IDENTIFIER_HASH_VALUE (id), 0); + IDENTIFIER_HASH_VALUE (id), NO_INSERT); if (!slot) return NULL; return *slot; @@ -228,7 +228,7 @@ cgraph_remove_node (struct cgraph_node *node) slot = htab_find_slot_with_hash (cgraph_hash, DECL_ASSEMBLER_NAME (node->decl), IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME - (node->decl)), 1); + (node->decl)), NO_INSERT); htab_clear_slot (cgraph_hash, slot); /* Do not free the structure itself so the walk over chain can continue. */ } @@ -433,7 +433,7 @@ cgraph_varpool_node (tree decl) slot = (struct cgraph_varpool_node **) htab_find_slot_with_hash (cgraph_varpool_hash, DECL_ASSEMBLER_NAME (decl), IDENTIFIER_HASH_VALUE (DECL_ASSEMBLER_NAME (decl)), - 1); + INSERT); if (*slot) return *slot; node = ggc_alloc_cleared (sizeof (*node)); @@ -458,7 +458,7 @@ cgraph_varpool_node_for_identifier (tree id) slot = (struct cgraph_varpool_node **) htab_find_slot_with_hash (cgraph_varpool_hash, id, - IDENTIFIER_HASH_VALUE (id), 0); + IDENTIFIER_HASH_VALUE (id), NO_INSERT); if (!slot) return NULL; return *slot; |