diff mbox

Kill TYPE_METHODS libcc1 6/9

Message ID 9643edc3-30ad-f9f9-9c6a-ceedd17ac554@acm.org
State New
Headers show

Commit Message

Nathan Sidwell July 14, 2017, 4:59 p.m. UTC
This is the libcc1 change.  When creating a clone, it needs to fiddle with 
TYPE_FIELDS now.

nathan
diff mbox

Patch

Index: libcc1/libcp1plugin.cc
===================================================================
--- libcc1/libcp1plugin.cc	(revision 250160)
+++ libcc1/libcp1plugin.cc	(working copy)
@@ -1556,7 +1556,7 @@  plugin_build_decl (cc1_plugin::connectio
 
   if ((ctor || dtor)
       /* Don't crash after a duplicate declaration of a cdtor.  */
-      && TYPE_METHODS (current_class_type) == decl)
+      && TYPE_FIELDS (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::connectio
       tree save = DECL_CHAIN (decl);
       DECL_CHAIN (decl) = NULL_TREE;
       clone_function_decl (decl, /*update_methods=*/true);
-      gcc_assert (TYPE_METHODS (current_class_type) == decl);
-      TYPE_METHODS (current_class_type)
-	= nreverse (TYPE_METHODS (current_class_type));
+      gcc_assert (TYPE_FIELDS (current_class_type) == decl);
+      TYPE_FIELDS (current_class_type)
+	= nreverse (TYPE_FIELDS (current_class_type));
       DECL_CHAIN (decl) = save;
     }