diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-02-20 20:09:20 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-02-20 20:09:20 +0000 |
| commit | a7765fea90294017b18b6a39cdc1a3531258d8c6 (patch) | |
| tree | 45e92104c1588297229aa1b2fe11b37cca2b3a33 /clang/lib/Serialization | |
| parent | d5c4844e02a3df00f40bf51eae9bd03da7ed4fa2 (diff) | |
| download | bcm5719-llvm-a7765fea90294017b18b6a39cdc1a3531258d8c6.tar.gz bcm5719-llvm-a7765fea90294017b18b6a39cdc1a3531258d8c6.zip | |
modern objc translator. Finish off first cut of the
modern meta-data translation by commenting out private ivar
declarations in user source. Also, added several tests.
llvm-svn: 150985
Diffstat (limited to 'clang/lib/Serialization')
| -rw-r--r-- | clang/lib/Serialization/ASTReaderDecl.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp index b7d6a91dfee..b5e9c3d1794 100644 --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -770,6 +770,8 @@ void ASTDeclReader::VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *FD) { void ASTDeclReader::VisitObjCCategoryDecl(ObjCCategoryDecl *CD) { VisitObjCContainerDecl(CD); CD->setCategoryNameLoc(ReadSourceLocation(Record, Idx)); + CD->setIvarLBraceLoc(ReadSourceLocation(Record, Idx)); + CD->setIvarRBraceLoc(ReadSourceLocation(Record, Idx)); // Note that this category has been deserialized. We do this before // deserializing the interface declaration, so that it will consider this @@ -829,6 +831,8 @@ void ASTDeclReader::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) { void ASTDeclReader::VisitObjCImplementationDecl(ObjCImplementationDecl *D) { VisitObjCImplDecl(D); D->setSuperClass(ReadDeclAs<ObjCInterfaceDecl>(Record, Idx)); + D->setIvarLBraceLoc(ReadSourceLocation(Record, Idx)); + D->setIvarRBraceLoc(ReadSourceLocation(Record, Idx)); llvm::tie(D->IvarInitializers, D->NumIvarInitializers) = Reader.ReadCXXCtorInitializers(F, Record, Idx); D->setHasSynthBitfield(Record[Idx++]); diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 584ff1c1442..f57a166d7ca 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -541,6 +541,8 @@ void ASTDeclWriter::VisitObjCAtDefsFieldDecl(ObjCAtDefsFieldDecl *D) { void ASTDeclWriter::VisitObjCCategoryDecl(ObjCCategoryDecl *D) { VisitObjCContainerDecl(D); Writer.AddSourceLocation(D->getCategoryNameLoc(), Record); + Writer.AddSourceLocation(D->getIvarLBraceLoc(), Record); + Writer.AddSourceLocation(D->getIvarRBraceLoc(), Record); Writer.AddDeclRef(D->getClassInterface(), Record); Record.push_back(D->protocol_size()); for (ObjCCategoryDecl::protocol_iterator @@ -593,6 +595,8 @@ void ASTDeclWriter::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) { void ASTDeclWriter::VisitObjCImplementationDecl(ObjCImplementationDecl *D) { VisitObjCImplDecl(D); Writer.AddDeclRef(D->getSuperClass(), Record); + Writer.AddSourceLocation(D->getIvarLBraceLoc(), Record); + Writer.AddSourceLocation(D->getIvarRBraceLoc(), Record); Writer.AddCXXCtorInitializers(D->IvarInitializers, D->NumIvarInitializers, Record); Record.push_back(D->hasSynthBitfield()); |

