[GCC-XML]Get rid of compiler created construcors

Paul Ross gccxml at paulross.demon.co.uk
Mon Oct 13 04:10:51 EDT 2003


>  > I am generating XMI (UML) with the information from GCC-XML. In the XMI
>>  I don't want to have the compiler generated constructors (copy constr.
>>  and standard constr.) but the problem is that I cannot distinguish in
>>  the file generated by GCC-XML if the constructor has been added by the
>>  compiler or is coded in the source file. Is it somehow possible to
>>  exclude the compiler generated constructors with GCC-XML?
>
>There is no way to get rid of them right now.  Probably the right thing to
>do is to add an extra attribute that marks them as artificially generated:
>
>   <Constructor id="_4" name="A" throw="" context="_1" 
>location="f0:1" artificial="1"/>
>
>Will this be sufficient for your needs?
>
>-Brad
>
>_______________________________________________
>gccxml mailing list
>gccxml at gccxml.org
>http://www.gccxml.org/mailman/listinfo/gccxml

Brad,

This also might be useful for variables as well and so identify 
compiler generated vtables. I seems to work with the addition of:

   xml_print_artificial_attribute (xdi, vd);

To xml_output_var_decl() in xml.c

Regards,

Paul.






More information about the gccxml mailing list