[cfe-commits] r107474 - in /cfe/trunk/lib/Frontend: PCHReader.cpp PCHWriter.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Jul 2 04:55:24 PDT 2010


Author: akirtzidis
Date: Fri Jul  2 06:55:24 2010
New Revision: 107474

URL: http://llvm.org/viewvc/llvm-project?rev=107474&view=rev
Log:
Fix reading of DependentNameType.

Modified:
    cfe/trunk/lib/Frontend/PCHReader.cpp
    cfe/trunk/lib/Frontend/PCHWriter.cpp

Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=107474&r1=107473&r2=107474&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Fri Jul  2 06:55:24 2010
@@ -2217,7 +2217,8 @@
     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: {

Modified: cfe/trunk/lib/Frontend/PCHWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHWriter.cpp?rev=107474&r1=107473&r2=107474&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Fri Jul  2 06:55:24 2010
@@ -260,6 +260,9 @@
   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;
 }
 





More information about the cfe-commits mailing list