diff options
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r-- | gcc/attribs.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c index 54373eb..427a0f6 100644 --- a/gcc/attribs.c +++ b/gcc/attribs.c @@ -85,7 +85,7 @@ struct scoped_attributes { const char *ns; vec<attribute_spec> attributes; - hash_table <attribute_hasher> attribute_hash; + hash_table<attribute_hasher> *attribute_hash; }; /* The table of scope attributes. */ @@ -144,7 +144,7 @@ register_scoped_attributes (const struct attribute_spec * attributes, sa.ns = ns; sa.attributes.create (64); result = attributes_table.safe_push (sa); - result->attribute_hash.create (200); + result->attribute_hash = new hash_table<attribute_hasher> (200); } /* Really add the attributes to their namespace now. */ @@ -281,7 +281,7 @@ register_scoped_attribute (const struct attribute_spec *attr, gcc_assert (attr != NULL && name_space != NULL); - gcc_assert (name_space->attribute_hash.is_created ()); + gcc_assert (name_space->attribute_hash); str.str = attr->name; str.length = strlen (str.str); @@ -291,8 +291,8 @@ register_scoped_attribute (const struct attribute_spec *attr, gcc_assert (str.length > 0 && str.str[0] != '_'); slot = name_space->attribute_hash - .find_slot_with_hash (&str, substring_hash (str.str, str.length), - INSERT); + ->find_slot_with_hash (&str, substring_hash (str.str, str.length), + INSERT); gcc_assert (!*slot || attr->name[0] == '*'); *slot = CONST_CAST (struct attribute_spec *, attr); } @@ -316,8 +316,9 @@ lookup_scoped_attribute_spec (const_tree ns, const_tree name) attr.str = IDENTIFIER_POINTER (name); attr.length = IDENTIFIER_LENGTH (name); extract_attribute_substring (&attr); - return attrs->attribute_hash.find_with_hash (&attr, - substring_hash (attr.str, attr.length)); + return attrs->attribute_hash->find_with_hash (&attr, + substring_hash (attr.str, + attr.length)); } /* Return the spec for the attribute named NAME. If NAME is a TREE_LIST, |