Allow reading of InjectedClassNameType from PCH even when its decl is currently initializing.
llvm-svn: 107473
This commit is contained in:
parent
ee776bcb7a
commit
dab33c5d33
|
@ -2544,6 +2544,9 @@ class InjectedClassNameType : public Type {
|
|||
|
||||
friend class ASTContext; // ASTContext creates these.
|
||||
friend class TagDecl; // TagDecl mutilates the Decl
|
||||
friend class PCHReader; // FIXME: ASTContext::getInjectedClassNameType is not
|
||||
// currently suitable for PCH reading, too much
|
||||
// interdependencies.
|
||||
InjectedClassNameType(CXXRecordDecl *D, QualType TST)
|
||||
: Type(InjectedClassName, QualType(), true),
|
||||
Decl(D), InjectedType(TST) {
|
||||
|
|
|
@ -2197,7 +2197,10 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) {
|
|||
case pch::TYPE_INJECTED_CLASS_NAME: {
|
||||
CXXRecordDecl *D = cast<CXXRecordDecl>(GetDecl(Record[0]));
|
||||
QualType TST = GetType(Record[1]); // probably derivable
|
||||
return Context->getInjectedClassNameType(D, TST);
|
||||
// FIXME: ASTContext::getInjectedClassNameType is not currently suitable
|
||||
// for PCH reading, too much interdependencies.
|
||||
return
|
||||
QualType(new (*Context, TypeAlignment) InjectedClassNameType(D, TST), 0);
|
||||
}
|
||||
|
||||
case pch::TYPE_TEMPLATE_TYPE_PARM: {
|
||||
|
|
Loading…
Reference in New Issue