On 09/22/2012 05:30 PM, Andrej Mitrovic wrote: > Hi, > > Is there any way to modify gccxml to export an "isTemplate" field to > the xml for functions/methods? I specifically mean functions which are > templated, not ordinary functions that belong to templated classes. > > I have a codegenerator in which I want to avoid generating templated > functions because writing C wrappers is hard without knowing how to > invoke the templated function. I want to filter them out entirely. > > I could try to parse the "demangled" field and figure out if a > function is templated, but this is unreliable.
Look in GCC/gcc/cp/xml.c at the xml_add_template_decl function. There is a loop to dump member template instantiations. You could start there to look for a way to do this. -Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://www.gccxml.org/mailman/listinfo/gccxml
