[GCC-XML] template_origin for class templates
Jochen Becher
jochen_becher at gmx.de
Sat Mar 28 11:17:21 EDT 2009
Hi,
I need some more information about template classes than are currently
written by gccxml: Each <Class/> which is an template instantiation
should provide an attribute "template_origin" that links to the template
it is created from.
I added the following code to xml_output_record_type (from xml.c):
{
tree tt = CLASSTYPE_PRIMARY_TEMPLATE_TYPE (rt);
if (tt != rt)
{
int id = xml_add_node (xdi, tt, dn->complete);
fprintf (xdi->file, " template_origin=\"_%d\"", id);
}
}
Unfortunately CLASSTYPE_PRIMARY_TEMPLATE_TYPE() always return the most
general template. Is there any possibility to find out the type of the
most specialized template? And to link from that specialized template to
a more generalized template until the most generalized template is
reached?
BTW: what is the meaning of argument complete?
Thank you, Jochen
More information about the gccxml
mailing list