]> gcc.gnu.org Git - gcc.git/commitdiff
revert cloning patch
authorJason Merrill <jason@gcc.gnu.org>
Tue, 5 Dec 2000 13:32:35 +0000 (08:32 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 5 Dec 2000 13:32:35 +0000 (08:32 -0500)
From-SVN: r38035

gcc/cp/pt.c

index 8d7f33b32118b89d215b95681b19e2e2c8bca7e6..d975a7d0a04aea9ac96399dc4aa7ef217129465a 100644 (file)
@@ -5786,7 +5786,6 @@ tsubst_decl (t, args, type, in_decl)
            maybe_retrofit_in_chrg (r);
            if (DECL_CONSTRUCTOR_P (r))
              grok_ctor_properties (ctx, r);
-           clone_function_decl(r, /*update_method_vec_p=*/0);
          }
        else if (IDENTIFIER_OPNAME_P (DECL_NAME (r)))
          grok_op_properties (r, DECL_VIRTUAL_P (r), DECL_FRIEND_P (r));
@@ -9225,6 +9224,15 @@ do_decl_instantiation (declspecs, declarator, storage)
     cp_error ("storage class `%D' applied to template instantiation",
              storage);
 
+  /* Under the new ABI, we need to make sure to instantiate all the
+     cloned versions of constructors or destructors.  */
+  if (flag_new_abi &&
+      (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (result) || 
+       DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (result)) &&
+      !(TREE_CHAIN (result) && 
+       DECL_CLONED_FUNCTION (TREE_CHAIN (result))))
+    clone_function_decl(result, /*update_method_vec_p=*/0);
+      
   SET_DECL_EXPLICIT_INSTANTIATION (result);
   mark_decl_instantiated (result, extern_p);
   repo_template_instantiated (result, extern_p);
This page took 0.06986 seconds and 5 git commands to generate.