Refactor -frecord-gcc-switches.
authorMartin Liska <mliska@suse.cz>
Mon, 23 Nov 2020 12:40:04 +0000 (13:40 +0100)
committerMartin Liska <mliska@suse.cz>
Fri, 4 Dec 2020 09:13:51 +0000 (10:13 +0100)
commit7caa49706316e650fb67719e1a1bf3a35054b685
treebfe3d80eb7261ea7781761b41c645f4951d47e1b
parent241a2c498005207d52a3d64884e41953fc00275c
Refactor -frecord-gcc-switches.

gcc/ChangeLog:

* doc/tm.texi: Change argument of the record_gcc_switches
hook and remove SWITCH_TYPE_* enum values.
* dwarf2out.c (gen_producer_string): Move to opts.c and remove
handling of the dwarf_record_gcc_switches option.
(dwarf2out_early_finish): Use moved gen_producer_string
function.
* opts.c (gen_producer_string): New.
* opts.h (gen_producer_string): New.
* target.def: Change type of record_gcc_switches.
* target.h (enum print_switch_type): Remove.
(elf_record_gcc_switches): Change first argument.
* toplev.c (MAX_LINE): Remove.
(print_to_asm_out_file):  Likewise.
(print_to_stderr): Likewise.
(print_single_switch): Likewise.
(print_switch_values): Likewise.
(init_asm_output): Use new gen_producer_string function.
(process_options): Likewise.
* varasm.c (elf_record_gcc_switches): Just save the string argument
to the ELF container.
gcc/doc/tm.texi
gcc/dwarf2out.c
gcc/opts.c
gcc/opts.h
gcc/target.def
gcc/target.h
gcc/toplev.c
gcc/varasm.c