summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-22 23:20:34 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-22 23:20:34 +0000
commit85e110828e4ca7e60db59b210bd739dcf98c1b91 (patch)
tree70af7a5769986c17c235c0ffed119cd485a8dbf9 /clang/lib/Frontend/PCHReader.cpp
parent59ca33053b092cfe3d166b5044d9509e608ee306 (diff)
downloadbcm5719-llvm-85e110828e4ca7e60db59b210bd739dcf98c1b91.tar.gz
bcm5719-llvm-85e110828e4ca7e60db59b210bd739dcf98c1b91.zip
PCH support for Objective-C property declarations (UNTESTED!)
llvm-svn: 69843
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index 3ade493b4ec..e2cffb54543 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/lib/Frontend/PCHReader.cpp
@@ -303,7 +303,21 @@ void PCHDeclReader::VisitObjCCompatibleAliasDecl(ObjCCompatibleAliasDecl *CAD) {
void PCHDeclReader::VisitObjCPropertyDecl(ObjCPropertyDecl *D) {
VisitNamedDecl(D);
- // FIXME: Implement.
+ D->setType(Reader.GetType(Record[Idx++]));
+ // FIXME: stable encoding
+ D->setPropertyAttributes(
+ (ObjCPropertyDecl::PropertyAttributeKind)Record[Idx++]);
+ // FIXME: stable encoding
+ D->setPropertyImplementation(
+ (ObjCPropertyDecl::PropertyControl)Record[Idx++]);
+ D->setGetterName(Reader.ReadDeclarationName(Record, Idx).getObjCSelector());
+ D->setSetterName(Reader.ReadDeclarationName(Record, Idx).getObjCSelector());
+ D->setGetterMethodDecl(
+ cast_or_null<ObjCMethodDecl>(Reader.GetDecl(Record[Idx++])));
+ D->setSetterMethodDecl(
+ cast_or_null<ObjCMethodDecl>(Reader.GetDecl(Record[Idx++])));
+ D->setPropertyIvarDecl(
+ cast_or_null<ObjCIvarDecl>(Reader.GetDecl(Record[Idx++])));
}
void PCHDeclReader::VisitObjCImplDecl(ObjCImplDecl *D) {
@@ -2264,7 +2278,7 @@ Decl *PCHReader::ReadDeclRecord(uint64_t Offset, unsigned Index) {
}
case pch::DECL_OBJC_PROPERTY: {
- // FIXME: Implement.
+ D = ObjCPropertyDecl::Create(Context, 0, SourceLocation(), 0, QualType());
break;
}
OpenPOWER on IntegriCloud