This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Retrieve GENERIC function body in plugin


On Wed, Oct 24, 2012 at 12:55:23PM -0400, Peter Colberg wrote:
> The plugin registers a callback to PLUGIN_FINISH_UNIT, and therein
> retrieves function_decl nodes of the current translation unit by
> iterating over cgraph_nodes. However, getting the function body
> using DECL_SAVED_TREE(node) always returns NULL.

Never mind, I figured out a solution. One may register a callback
for PLUGIN_PRE_GENERICIZE, which receives a function declaration
as the first argument. This declaration contains the body.

Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]