[cfe-dev] Fix for PR4701

Douglas Gregor dgregor at apple.com
Thu Aug 20 17:29:41 PDT 2009


On Aug 20, 2009, at 9:42 AM, David Chisnall wrote:

> Hi Daniel,
>
> I've not yet - I don't know my way around the PCH code at all.  I
> believe the problem is that Sema::MergeTypeDefDecl() will be called
> when building the PCH, but not when loading it.  This sets the
> redefinition type, so without the call it is not properly loaded.  The
> fix would make sure that Context.ObjCIdRedefinitionType and
> Context.ObjCClassRedefinitionType were saved in the PCH and loaded
> again afterwards, but I don't know enough about how PCH handling works
> to fix this.
>
> I think the fix is to add lines to PCHWriter::WriteMetadata() to write
> these and corresponding lines in PCHReader:: to restore them, but
> maybe someone who knows how the PCH stuff works could comment?

This is fixed in r79583.

   - Doug



More information about the cfe-dev mailing list