This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ mangling, function name to mangled name (or tree)
Hello,
sorry to answer that late (I didn't saw your mail in my mailbox.... + I
was preparing me for RMLL/Libre software meeting).
Your solution looks to be a nice one, I am goiing to try it and I will
post the result of my experiment. I was not aware of that hook.
Thanks!
Pierre Vittet
Hello,
Have you considered the reverse way to do that. I mean, why don't you hook on the PLUGIN_PRE_GENERICIZE event to catch all function bodies, and then compare the argument the user gave you to current_function_name() (that will returns you the full protoype of the current function, ie: malloc full name is "void* malloc(size_t)"). Then, you can store the FUNCTION_DECL tree if there's a match and use it for later processing. That's how i proceed for my plugins.
Romain Geissler