Fix reading of DependentNameType.

llvm-svn: 107474
This commit is contained in:
Argyrios Kyrtzidis 2010-07-02 11:55:24 +00:00
parent dab33c5d33
commit e929095f4a
2 changed files with 5 additions and 1 deletions

View File

@ -2217,7 +2217,8 @@ QualType PCHReader::ReadTypeRecord(uint64_t Offset) {
ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];
NestedNameSpecifier *NNS = ReadNestedNameSpecifier(Record, Idx);
const IdentifierInfo *Name = this->GetIdentifierInfo(Record, Idx);
return Context->getDependentNameType(Keyword, NNS, Name, QualType());
QualType Canon = GetType(Record[Idx++]);
return Context->getDependentNameType(Keyword, NNS, Name, Canon);
}
case pch::TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION: {

View File

@ -260,6 +260,9 @@ PCHTypeWriter::VisitDependentNameType(const DependentNameType *T) {
Record.push_back(T->getKeyword());
Writer.AddNestedNameSpecifier(T->getQualifier(), Record);
Writer.AddIdentifierRef(T->getIdentifier(), Record);
Writer.AddTypeRef(T->isCanonicalUnqualified() ? QualType()
: T->getCanonicalTypeInternal(),
Record);
Code = pch::TYPE_DEPENDENT_NAME;
}