revert previous premature commit
authorNathan Sidwell <nathan@gcc.gnu.org>
Thu, 13 Jul 2017 12:38:32 +0000 (12:38 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 13 Jul 2017 12:38:32 +0000 (12:38 +0000)
From-SVN: r250181

libcc1/libcp1plugin.cc

index d7bf5a29d6d0019a3a87aeb6979814aebf6721d3..8dd5e673838728537b1fa408150ac5d63e531df0 100644 (file)
@@ -1556,7 +1556,7 @@ plugin_build_decl (cc1_plugin::connection *self,
 
   if ((ctor || dtor)
       /* Don't crash after a duplicate declaration of a cdtor.  */
-      && TYPE_FIELDS (current_class_type) == decl)
+      && TYPE_METHODS (current_class_type) == decl)
     {
       /* ctors and dtors clones are chained after DECL.
         However, we create the clones before TYPE_METHODS is
@@ -1568,9 +1568,9 @@ plugin_build_decl (cc1_plugin::connection *self,
       tree save = DECL_CHAIN (decl);
       DECL_CHAIN (decl) = NULL_TREE;
       clone_function_decl (decl, /*update_methods=*/true);
-      gcc_assert (TYPE_FIELDS (current_class_type) == decl);
-      TYPE_FIELDS (current_class_type)
-       = nreverse (TYPE_FIELDS (current_class_type));
+      gcc_assert (TYPE_METHODS (current_class_type) == decl);
+      TYPE_METHODS (current_class_type)
+       = nreverse (TYPE_METHODS (current_class_type));
       DECL_CHAIN (decl) = save;
     }