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]

Re: PR21391: pruning unused debugging types (c++ bits)


On Fri, May 05, 2006 at 09:24:13AM -0400, Daniel Jacobowitz wrote:
> On Thu, May 04, 2006 at 09:08:49PM -0400, Aldy Hernandez wrote:
> > +/* Given a type, insert it into the used hash table in cfun, only if
> > +   the type is a pointer or reference type.  */
> > +void
> > +maybe_used_types_insert (tree t)
> > +{
> > +  while (POINTER_TYPE_P (t) || TREE_CODE (t) == ARRAY_TYPE)
> > +    t = TREE_TYPE (t);
> > +  t = TYPE_MAIN_VARIANT (t);
> > +  if (t && debug_info_level > DINFO_LEVEL_NONE)
> > +    used_types_insert (t, cfun);
> > +}
> > +
> 
> I'm pretty sure that the comment is wrong now, and the name of the
> function and the t == NULL checks are a bit stale.  If debug_info_level
> is set this will always insert a type.

You're right.  Fixed.


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