[cfe-dev] [PATCH] Preserve -fretain-comments-from-system-headers in modules

Dmitri Gribenko gribozavr at gmail.com
Thu Jan 9 05:47:34 PST 2014


On Thu, Jan 9, 2014 at 6:51 AM, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:
> Looks good but making the flag part of the module hash requires a couple more changes.
>
> See my commit r180635 where I do the same for the detailed-preprocessing-record flag.
> Basically a PCH created with modules is pointing to the module file path, and the module hash is part of the path, so it is important the the module hash between the originating invocation and the PCH agree. That commit makes the flag significant when modules are enabled and rejects a PCH that didn't enable the flag.
>
> Also the flag should be serialized (this is shown in r180635 as well).

I think that serialization is automatically handled for all options
defined in LangOptions.def (ASTWriter::WriteControlBlock).  But
because this is a BENIGN_LANGOPT, ASTReader seems to skip checking
that they match.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the cfe-dev mailing list