This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Do not include output.h everywhere


On Thu, May 31, 2012 at 9:21 PM, Diego Novillo <dnovillo@google.com> wrote:
> 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.

I'd prefer toplev.h, too.  system.h is supposed to be for system header
inclusion (and related workarounds).

>
>> 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.

Thus, ok with moving to toplev.h instead.

>>
>> ? ? ? ?* 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]