diff options
author | Jason Merrill <jason@redhat.com> | 2011-06-29 10:34:47 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-06-29 10:34:47 -0400 |
commit | 874d29e5bebbebee89836e041a0de18d183d7303 (patch) | |
tree | 590df9964ce278f627ab15b5af319d0fd4de00ff /gcc/cp | |
parent | b198484e89cb986f278461a0ee2229154c6654ee (diff) | |
download | gcc-874d29e5bebbebee89836e041a0de18d183d7303.zip gcc-874d29e5bebbebee89836e041a0de18d183d7303.tar.gz gcc-874d29e5bebbebee89836e041a0de18d183d7303.tar.bz2 |
method.c (maybe_explain_implicit_delete): Use pointer_set instead of htab.
* method.c (maybe_explain_implicit_delete): Use pointer_set
instead of htab.
From-SVN: r175645
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/method.c | 12 |
2 files changed, 7 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 6177883..2cd5c0a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2011-06-29 Jason Merrill <jason@redhat.com> + * method.c (maybe_explain_implicit_delete): Use pointer_set + instead of htab. + * class.c (finalize_literal_type_property): Update conditions. * method.c (defaulted_late_check): Set TYPE_HAS_CONSTEXPR_CTOR. diff --git a/gcc/cp/method.c b/gcc/cp/method.c index de43a38..ec1c502 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1320,21 +1320,17 @@ maybe_explain_implicit_delete (tree decl) if (DECL_DEFAULTED_FN (decl)) { /* Not marked GTY; it doesn't need to be GC'd or written to PCH. */ - static htab_t explained_htab; - void **slot; + static struct pointer_set_t *explained; special_function_kind sfk; location_t loc; bool informed; tree ctype; - if (!explained_htab) - explained_htab = htab_create (37, htab_hash_pointer, - htab_eq_pointer, NULL); - slot = htab_find_slot (explained_htab, decl, INSERT); - if (*slot) + if (!explained) + explained = pointer_set_create (); + if (pointer_set_insert (explained, decl)) return true; - *slot = decl; sfk = special_function_p (decl); ctype = DECL_CONTEXT (decl); |