r211411 - Driver: Record that we're in crashdump and push flags to ConstructJob

Jordan Rose jordan_rose at apple.com
Mon Jun 23 15:21:46 PDT 2014

On Jun 23, 2014, at 15:18 , Justin Bogner <mail at justinbogner.com> wrote:

> Jordan Rose <jordan_rose at apple.com> writes:
>> Hm. .i isn't really correct for something that still has macros in
>> it. IIRC Clang happens to expand them again, but if we've merely
>> rewritten includes I would expect the resulting file to have a .c
>> extension.
> It's a bit tricky to get this right consistently in a crashdump context,
> due to the way the logic is split between the driver and cc1. Notably, I
> can fairly easily special case the driver here to use a .c extension for
> crashdumps, but as of r211421 that isn't always right. We don't really
> know if we're going to specify rewrite-includes or not at the time that
> we decide the filename.
> That said, the trade off is a matter of which is worse:
> 1. Crashdump files named .i/.mi even though they still have macros when
>   -fmodules isn't present, or
> 2. Crashdump files named .c/.m even though they're fully preprocessed
>   when -fmodules is present.
> I suppose that, given we'd like to make rewrite-includes and module
> crashdumps work together in the long term, (2) is a better trade off.
> It also avoids changing the status quo. Agree?

I think I agree as well. "Fully preprocessed" is a little weird when modules are involved anyway.


More information about the cfe-commits mailing list