method.c (maybe_explain_implicit_delete): Use pointer_set instead of htab.
authorJason Merrill <jason@redhat.com>
Wed, 29 Jun 2011 14:34:47 +0000 (10:34 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 29 Jun 2011 14:34:47 +0000 (10:34 -0400)
* method.c (maybe_explain_implicit_delete): Use pointer_set
instead of htab.

From-SVN: r175645

gcc/cp/ChangeLog
gcc/cp/method.c

index 61778830bf1ff47d297acd21c40b14044f2fca8f..2cd5c0a4324167ea7858e816f384fa2f0e310e11 100644 (file)
@@ -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.
 
index de43a386f774d22be36a2390aa668b875cd59d7d..ec1c50252782a5a1be74aee538990548b362ae30 100644 (file)
@@ -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);