This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cleanup remap_decl


Hi,
Diego noticed yesterday that remap_decl construct the map twice for no
reason.  (I think the call was moved upfront because remap_decl is
recursive and the other copy was not removed).  I also took oppurtunity
to kill the #if 0 block staying there for ages.

Bootstrapped/regtested i686-pc-gnu-linux, OK?
Honza

2005-09-18  Jan Hubicka  <jh@suse.cz>
	* tree-inline.c (remap_decl): Kill redundant call to insert_decl_map
	and #if 0 block.
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.210
diff -c -3 -p -r1.210 tree-inline.c
*** tree-inline.c	1 Aug 2005 15:25:28 -0000	1.210
--- tree-inline.c	17 Sep 2005 22:55:02 -0000
*************** remap_decl (tree decl, inline_data *id)
*** 225,255 ****
  	    walk_tree (&DECL_QUALIFIER (t), copy_body_r, id, NULL);
  	}
  
- #if 0
-       /* FIXME handle anon aggrs.  */
-       if (! DECL_NAME (t) && TREE_TYPE (t)
- 	  && lang_hooks.tree_inlining.anon_aggr_type_p (TREE_TYPE (t)))
- 	{
- 	  /* For a VAR_DECL of anonymous type, we must also copy the
- 	     member VAR_DECLS here and rechain the DECL_ANON_UNION_ELEMS.  */
- 	  tree members = NULL;
- 	  tree src;
- 
- 	  for (src = DECL_ANON_UNION_ELEMS (t); src;
- 	       src = TREE_CHAIN (src))
- 	    {
- 	      tree member = remap_decl (TREE_VALUE (src), id);
- 
- 	      gcc_assert (!TREE_PURPOSE (src));
- 	      members = tree_cons (NULL, member, members);
- 	    }
- 	  DECL_ANON_UNION_ELEMS (t) = nreverse (members);
- 	}
- #endif
- 
-       /* Remember it, so that if we encounter this local entity
- 	 again we can reuse this copy.  */
-       insert_decl_map (id, decl, t);
        return t;
      }
  
--- 225,230 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]