[cfe-dev] Late Parsed Template support for PCH

Will Wilson will at indefiant.com
Wed Jul 24 09:18:32 PDT 2013


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?

Cheers,
Will.

-- 
*Indefiant Ltd.*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130724/fe728e83/attachment.html>


More information about the cfe-dev mailing list