[cfe-dev] PCH for C++ (take 2)

John McCall rjmccall at apple.com
Tue Jan 26 14:43:35 PST 2010

On Jan 26, 2010, at 2:26 PM, Andrew Sutton wrote:
>   bool hasUserDeclaredConstructor() const {
> -    assert((isDefinition() ||
> +    // FIXME: Injected class names are troublesome and cause assertions in
> +    // the PCH writer if we don't allow them to be queried.
> +    assert((isDefinition() || isInjectedClassName() ||
> Probably best to just give injected class names a different layout in the PCH record;  otherwise they're going to occupy a lot of redundant space.
> That might be easier said than done. The injected class name is serialized as part of a DeclContext, just like any other nested declaration.

I mean that, when you're serializing a CXXRecordDecl, you can ask if it's an injected class name and decide how to lay out the record decl based on that.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100126/16bb106d/attachment.html>

More information about the cfe-dev mailing list