On 12-05-31 14:57 , Steven Bosscher wrote:
Hello,
Almost all files include output.h because it defines dump_file. IMHO
output.h should only be included in files that actually output
something to asm_out_file. Therefore wanted to I move dump_file to
some other include file. I ended up with system.h because I couldn't
find a more suitable place. Another option is coretypes.h, but no
other file is included everywhere, and system.h also already defines
fancy_abort, which is also for dumping things - sort of... Anyway, the
point is that with dump_file moved out of output.h, ~120 files don't
have to include output.h anymore.
What about toplev.h? dump_file is defined there, after all. I don't
mind it in system.h, if that's not a good place for it now. The patch
is OK either way.
While working on the above, I noticed we can also move all dbxout
prototypes from output.h to dbxout.h, and move some stabs-related
target hooks there also.
Sounds good.
Big patch, but IMHO a nice cleanup too :-)
Indeed.
* gcov-dump.c (dump_file): Rename to dump_gcov_file. Update callers.
* collect2.h (dump_file): Rename to dump_ld_file.
Thanks. I've always hated tagging for dump_file and stopping here.
Diego.