const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
-
+ void setClassInterface(ObjCInterfaceDecl *IFace) { ClassInterface = IFace; }
+
void addInstanceMethod(ASTContext &Context, ObjCMethodDecl *method) {
+ // FIXME: Context should be set correctly before we get here.
method->setLexicalDeclContext(this);
addDecl(Context, method);
}
void addClassMethod(ASTContext &Context, ObjCMethodDecl *method) {
+ // FIXME: Context should be set correctly before we get here.
method->setLexicalDeclContext(this);
addDecl(Context, method);
}
void ObjCImplDecl::addPropertyImplementation(ASTContext &Context,
ObjCPropertyImplDecl *property) {
+ // FIXME: The context should be correct before we get here.
property->setLexicalDeclContext(this);
addDecl(Context, property);
}
void PCHDeclReader::VisitObjCImplDecl(ObjCImplDecl *D) {
VisitDecl(D);
- // FIXME: Implement.
+ D->setClassInterface(
+ cast_or_null<ObjCInterfaceDecl>(Reader.GetDecl(Record[Idx++])));
+ D->setLocEnd(SourceLocation::getFromRawEncoding(Record[Idx++]));
}
void PCHDeclReader::VisitObjCCategoryImplDecl(ObjCCategoryImplDecl *D) {
void PCHDeclWriter::VisitObjCImplDecl(ObjCImplDecl *D) {
VisitDecl(D);
- // FIXME: Implement.
+ Writer.AddDeclRef(D->getClassInterface(), Record);
+ Writer.AddSourceLocation(D->getLocEnd(), Record);
// Abstract class (no need to define a stable pch::DECL code).
}