diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-12-12 08:04:10 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-12-12 08:04:10 -0500 |
commit | af493865052a8f8a4e33e690717fcaeb30a7e5e8 (patch) | |
tree | 36fd15dd9ab75ff24603d4210e4cd855dad6e0e2 | |
parent | b0e0a0f9a896325adff6975a7ccf152bb7fc09cd (diff) | |
download | gcc-af493865052a8f8a4e33e690717fcaeb30a7e5e8.zip gcc-af493865052a8f8a4e33e690717fcaeb30a7e5e8.tar.gz gcc-af493865052a8f8a4e33e690717fcaeb30a7e5e8.tar.bz2 |
(type_hash_canon): Clean up obstack usage a bit.
From-SVN: r6223
-rw-r--r-- | gcc/tree.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -2822,9 +2822,7 @@ type_hash_canon (hashcode, type) t1 = type_hash_lookup (hashcode, type); if (t1 != 0) { - struct obstack *o - = TREE_PERMANENT (type) ? &permanent_obstack : saveable_obstack; - obstack_free (o, type); + obstack_free (TYPE_OBSTACK (type), type); #ifdef GATHER_STATISTICS tree_node_counts[(int)t_kind]--; tree_node_sizes[(int)t_kind] -= sizeof (struct tree_type); @@ -2832,8 +2830,8 @@ type_hash_canon (hashcode, type) return t1; } - /* If this is a new type, record it for later reuse. */ - if (current_obstack == &permanent_obstack) + /* If this is a permanent type, record it for later reuse. */ + if (TREE_PERMANENT (type)) type_hash_add (hashcode, type); return type; |