From df90325d4c0a65ee64d2dae3ed9b5b34f7418533 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Wed, 3 Mar 2010 17:28:16 +0000 Subject: Update clang to 97654. --- lib/Frontend/PCHReaderDecl.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'lib/Frontend/PCHReaderDecl.cpp') diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index 625997c..356bd07 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/lib/Frontend/PCHReaderDecl.cpp @@ -39,6 +39,7 @@ namespace { void VisitDecl(Decl *D); void VisitTranslationUnitDecl(TranslationUnitDecl *TU); void VisitNamedDecl(NamedDecl *ND); + void VisitNamespaceDecl(NamespaceDecl *D); void VisitTypeDecl(TypeDecl *TD); void VisitTypedefDecl(TypedefDecl *TD); void VisitTagDecl(TagDecl *TD); @@ -96,6 +97,18 @@ void PCHDeclReader::VisitNamedDecl(NamedDecl *ND) { ND->setDeclName(Reader.ReadDeclarationName(Record, Idx)); } +void PCHDeclReader::VisitNamespaceDecl(NamespaceDecl *D) { + VisitNamedDecl(D); + D->setLBracLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); + D->setRBracLoc(SourceLocation::getFromRawEncoding(Record[Idx++])); + D->setNextNamespace( + cast_or_null(Reader.GetDecl(Record[Idx++]))); + D->setOriginalNamespace( + cast_or_null(Reader.GetDecl(Record[Idx++]))); + D->setAnonymousNamespace( + cast_or_null(Reader.GetDecl(Record[Idx++]))); +} + void PCHDeclReader::VisitTypeDecl(TypeDecl *TD) { VisitNamedDecl(TD); TD->setTypeForDecl(Reader.GetType(Record[Idx++]).getTypePtr()); @@ -235,7 +248,6 @@ void PCHDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) { IVars.reserve(NumIvars); for (unsigned I = 0; I != NumIvars; ++I) IVars.push_back(cast(Reader.GetDecl(Record[Idx++]))); - ID->setIVarList(IVars.data(), NumIvars, *Reader.getContext()); ID->setCategoryList( cast_or_null(Reader.GetDecl(Record[Idx++]))); ID->setForwardDecl(Record[Idx++]); @@ -517,6 +529,10 @@ Attr *PCHReader::ReadAttributes() { SIMPLE_ATTR(GNUInline); SIMPLE_ATTR(Hiding); + case Attr::IBActionKind: + New = ::new (*Context) IBActionAttr(); + break; + case Attr::IBOutletKind: New = ::new (*Context) IBOutletAttr(); break; @@ -546,7 +562,9 @@ Attr *PCHReader::ReadAttributes() { SIMPLE_ATTR(ObjCException); SIMPLE_ATTR(ObjCNSObject); + SIMPLE_ATTR(CFReturnsNotRetained); SIMPLE_ATTR(CFReturnsRetained); + SIMPLE_ATTR(NSReturnsNotRetained); SIMPLE_ATTR(NSReturnsRetained); SIMPLE_ATTR(Overloadable); SIMPLE_ATTR(Override); @@ -568,6 +586,7 @@ Attr *PCHReader::ReadAttributes() { SIMPLE_ATTR(WarnUnusedResult); SIMPLE_ATTR(Weak); + SIMPLE_ATTR(WeakRef); SIMPLE_ATTR(WeakImport); } @@ -738,6 +757,10 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) { case pch::DECL_BLOCK: D = BlockDecl::Create(*Context, 0, SourceLocation()); break; + + case pch::DECL_NAMESPACE: + D = NamespaceDecl::Create(*Context, 0, SourceLocation(), 0); + break; } assert(D && "Unknown declaration reading PCH file"); -- cgit v1.1