In commit
2711e4754fc ("Ensure cooked_index_entry self-tests are run"), we
rewrite the function definition of _initialize_dwarf2_entry into a normal
form that allows the make-init-c script to detect it:
...
void _initialize_dwarf2_entry ();
-void _initialize_dwarf2_entry ()
+void
+_initialize_dwarf2_entry ()
...
Update make-init-c to also detect the "void _initialize_dwarf2_entry ()"
variant.
Tested on x86_64-linux, by reverting commit
2711e4754fc, rebuilding and
checking that build/gdb/init.c doesn't change.
echo "/* It is created automatically by the Makefile. */"
echo "#include <algorithm>"
echo ""
-sed -n -e 's/^\(_initialize_[a-zA-Z0-9_]*\) ()$/\1/p' "$@" | while read -r name; do
+sed -n -e 's/^\(void \|\)\(_initialize_[a-zA-Z0-9_]*\) ()$/\2/p' "$@" | while read -r name; do
echo "extern initialize_file_ftype $name;"
done
echo ""
echo "{"
echo " std::vector<initialize_file_ftype *> functions ="
echo " {"
-sed -n -e 's/^\(_initialize_[a-zA-Z0-9_]*\) ()$/\1/p' "$@" | while read -r name; do
+sed -n -e 's/^\(void \|\)\(_initialize_[a-zA-Z0-9_]*\) ()$/\2/p' "$@" | while read -r name; do
echo " $name,"
done
echo " };"