> Hi,
> 
> On Mon, Aug 19, 2013 at 04:01:16PM +0200, Jan Hubicka wrote:
> 
> [...]
> 
> > 
> >     * Makefile.in (ipa-devirt.o): Add dependency on diagnostic.h
> >     * ipa-devirt.c: Include diganostic.h
> >     (odr_type_d): Add types and types_set.
> >     (hash_type_name): Work for types with vtables during LTO.
> >     (odr_hasher::remove): Fix comment; destroy types_set.
> >     (add_type_duplicate): New function,
> >     (get_odr_type): Use it.
> >     (dump_type_inheritance_graph): Dump type duplicates.
> >     * ipa.c (symtab_remove_unreachable_nodes): Build type inheritance
> >     graph.
> >     * tree.c (types_same_for_odr): Give exact answers on types with
> >     virtual tables.
> 
> [...]
> 
> > Index: ipa-devirt.c
> > ===================================================================
> > *** ipa-devirt.c    (revision 201836)
> > --- ipa-devirt.c    (working copy)
> > *************** static odr_hash_type odr_hash;
> > *** 222,227 ****
> > --- 251,382 ----
> >   static GTY(()) vec <odr_type, va_gc> *odr_types_ptr;
> >   #define odr_types (*odr_types_ptr)
> >   
> > + /* TYPE is equivalent to VAL by ODR, but its tree representation differs
> > +    from VAL->type.  This may happen in LTO where tree merging did not 
> > merge
> > +    all variants of the same type.  It may or may not mean the ODR 
> > violation.
> > +    Add it to the list of duplicates and warn on some violations.  */
> > + 
> > + void
> > + add_type_duplicate (odr_type val, tree type)
> > + {
> 
> It seems the function can be made static.  If not, it should probably
> have a name that would be less prone to clashes.
Yes, it can be static.  It is anoying we no longer have those missing static
keyword warnings like before switch to c++.  I updated my local tree.

Thanks,
Honza
> 
> Thanks,
> 
> Martin

Reply via email to