diff options
Diffstat (limited to 'contrib/filter_params.pl')
-rwxr-xr-x | contrib/filter_params.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/contrib/filter_params.pl b/contrib/filter_params.pl new file mode 100755 index 00000000000..05861e376fe --- /dev/null +++ b/contrib/filter_params.pl @@ -0,0 +1,14 @@ +#!/usr/bin/perl + +# Filters out some of the #defines used thourghout the GCC sources: +# - GTY(()) marks declarations for gengtype.c +# - PARAMS(()) is used for K&R compatibility. See ansidecl.h. + +while (<>) { + s/^\/\* /\/\*\* \@verbatim /; + s/\*\// \@endverbatim \*\//; + s/GTY[ \t]*\(\(.*\)\)//g; + s/[ \t]ATTRIBUTE_UNUSED//g; + s/PARAMS[ \t]*\(\((.*?)\)\)/\($1\)/sg; + print; +} |