Mercurial > hg > CbC > CbC_gcc
comparison gcc/plugin.h @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
1 /* Header file for internal GCC plugin mechanism. | 1 /* Header file for internal GCC plugin mechanism. |
2 Copyright (C) 2009 Free Software Foundation, Inc. | 2 Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify | 6 GCC is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
24 | 24 |
25 struct attribute_spec; | 25 struct attribute_spec; |
26 | 26 |
27 extern void add_new_plugin (const char *); | 27 extern void add_new_plugin (const char *); |
28 extern void parse_plugin_arg_opt (const char *); | 28 extern void parse_plugin_arg_opt (const char *); |
29 extern int invoke_plugin_callbacks (int, void *); | 29 extern int invoke_plugin_callbacks_full (int, void *); |
30 extern void initialize_plugins (void); | 30 extern void initialize_plugins (void); |
31 extern bool plugins_active_p (void); | 31 extern bool plugins_active_p (void); |
32 extern void dump_active_plugins (FILE *); | 32 extern void dump_active_plugins (FILE *); |
33 extern void debug_active_plugins (void); | 33 extern void debug_active_plugins (void); |
34 extern void print_plugins_versions (FILE *file, const char *indent); | 34 extern void print_plugins_versions (FILE *file, const char *indent); |
35 extern void print_plugins_help (FILE *file, const char *indent); | 35 extern void print_plugins_help (FILE *file, const char *indent); |
36 extern void finalize_plugins (void); | 36 extern void finalize_plugins (void); |
37 | 37 |
38 extern bool flag_plugin_added; | |
39 | |
40 /* Called from inside GCC. Invoke all plugin callbacks registered with | |
41 the specified event. | |
42 Return PLUGEVT_SUCCESS if at least one callback was called, | |
43 PLUGEVT_NO_CALLBACK if there was no callback. | |
44 | |
45 EVENT - the event identifier | |
46 GCC_DATA - event-specific data provided by the compiler */ | |
47 | |
48 static inline int | |
49 invoke_plugin_callbacks (int event ATTRIBUTE_UNUSED, | |
50 void *gcc_data ATTRIBUTE_UNUSED) | |
51 { | |
52 #ifdef ENABLE_PLUGIN | |
53 /* True iff at least one plugin has been added. */ | |
54 if (flag_plugin_added) | |
55 return invoke_plugin_callbacks_full (event, gcc_data); | |
56 #endif | |
57 | |
58 return PLUGEVT_NO_CALLBACK; | |
59 } | |
60 | |
38 /* In attribs.c. */ | 61 /* In attribs.c. */ |
39 | 62 |
40 extern void register_attribute (const struct attribute_spec *attr); | 63 extern void register_attribute (const struct attribute_spec *attr); |
41 | 64 |
42 #endif /* PLUGIN_H */ | 65 #endif /* PLUGIN_H */ |