This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
how to output function prototypes from a plugin
- From: Joachim Wieland <joe at mcknight dot de>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 6 Dec 2010 09:08:25 -0500
- Subject: how to output function prototypes from a plugin
I am writing a plugin that should dump out function declarations and
definitions as the compiler sees them. One thing that I noticed
(besides that Brian Hackett's PLUGIN_FINISH_DECL hook should really be
applied to future versions) was that there does not seem to be a
function that could output the full prototype of a function in a
standardized form.
I found lhd_decl_printable_name() which only gives me the name but not
the full declaration and there are some pretty printer routines for C
in c-pretty-print.c and tree-pretty-print.c and for C++ it seems that
what I need lives in cp/error.c. All of those functions are static...
Have I missed anything?
Thank you very much,
Joachim