GCC Middle and Back End API Reference
plugin.h File Reference

Go to the source code of this file.


void add_new_plugin (const char *)
void parse_plugin_arg_opt (const char *)
int invoke_plugin_callbacks_full (int, void *)
void initialize_plugins (void)
bool plugins_active_p (void)
void dump_active_plugins (FILE *)
void debug_active_plugins (void)
void warn_if_plugins (void)
void plugins_internal_error_function (diagnostic_context *, const char *, va_list *)
void print_plugins_versions (FILE *file, const char *indent)
void print_plugins_help (FILE *file, const char *indent)
void finalize_plugins (void)
static int invoke_plugin_callbacks (int event, void *gcc_data)
void register_attribute (const struct attribute_spec *attr)
struct scoped_attributesregister_scoped_attributes (const struct attribute_spec *, const char *)


bool flag_plugin_added

Function Documentation

void add_new_plugin ( const char *  )
void debug_active_plugins ( void  )
   Dump active plugins to stderr.  
void dump_active_plugins ( FILE *  )
void finalize_plugins ( void  )
   Free memory allocated by the plugin system. 
     We can now delete the plugin_name_args object as it will no longer
     be used. Note that base_name and argv fields (both of which were also
     dynamically allocated) are not freed as they could still be used by
     the plugin code.  
     PLUGIN_NAME_ARGS_TAB is no longer needed, just delete it.  

References plugin_name_args::base_name, print_options::file, plugin_name_args::help, and print_options::indent.

void initialize_plugins ( void  )
   Main plugin initialization function.  Called from compile_file() in
     If no plugin was specified in the command-line, simply return.  
     Traverse and initialize each plugin specified in the command-line.  

References print_options::file, and print_options::indent.

static int invoke_plugin_callbacks ( int  event,
void *  gcc_data 
   Called from inside GCC.  Invoke all plugin callbacks registered with
   the specified event.
   Return PLUGEVT_SUCCESS if at least one callback was called,
   PLUGEVT_NO_CALLBACK if there was no callback.

   EVENT    - the event identifier
   GCC_DATA - event-specific data provided by the compiler  
     True iff at least one plugin has been added.  

References flag_plugin_added, and invoke_plugin_callbacks_full().

Referenced by is_pass_explicitly_enabled_or_disabled().

int invoke_plugin_callbacks_full ( int  ,
void *   
void parse_plugin_arg_opt ( const char *  )
bool plugins_active_p ( void  )
   Return true if plugins have been loaded.  

Referenced by print_help_one_plugin().

void plugins_internal_error_function ( diagnostic_context context,
const char *  msgid,
va_list *  ap 
   Likewise, as a callback from the diagnostics code.  
void print_plugins_help ( FILE *  file,
const char *  indent 
void print_plugins_versions ( FILE *  file,
const char *  indent 
void register_attribute ( const struct attribute_spec *  attr)
   In attribs.c.  
struct scoped_attributes* register_scoped_attributes ( const struct attribute_spec *  attributes,
const char *  ns 
   Insert an array of attributes ATTRIBUTES into a namespace.  This
   array must be NULL terminated.  NS is the name of attribute
   namespace.  The function returns the namespace into which the
   attributes have been registered.  
     See if we already have attributes in the namespace NS.  
         We don't have any namespace NS yet.  Create one.  
     Really add the attributes to their namespace now.  
void warn_if_plugins ( void  )
   Give a warning if plugins are present, before an ICE message asking
   to submit a bug report.  

Variable Documentation

bool flag_plugin_added
   For invoke_plugin_callbacks(), see plugin.h.  

Referenced by get_plugin_base_name(), and invoke_plugin_callbacks().