[cfe-dev] Late Parsed Template support for PCH
Douglas Gregor
dgregor at apple.com
Thu Jul 25 09:18:02 PDT 2013
On Jul 24, 2013, at 9:18 AM, Will Wilson <will at indefiant.com> wrote:
> Hi All,
>
> I've discovered a rather nasty issue with -fdelayed-template-parsing enabled. If this is used to build a PCH all of the stored template tokens are lost leading an incomplete AST when the PCH is used to create the complete TU.
>
> Is this by design or a missing feature for the serialization code?
>
> Unfortunately, due to a huge body of MSVC targeted code and a need to use PCH files to maintain acceptable performance I need to make this work seamlessly. The data that would need preserving is currently stored in the Parser and is a map of const FunctionDecl* to LateParsedTemplatedFunction*. The LateParsedTemplatedFunction is essentially a SmallVector of Tokens.
>
> Before I dive in and attempt to add support for serializing this, is there anything I should know?
It’s a missing feature. One will need to serialize the actual tokens for each of the late-parsed FunctionDecl’s, and be able to lazily deserialize and then parse the tokens when an actual definition is needed.
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130725/71f88316/attachment.html>
More information about the cfe-dev
mailing list