зеркало из https://github.com/microsoft/clang-1.git
Added PCH/ASTImporter code for ObjCIvarDecl's field.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
920bf45bd7
Коммит
ac0021ba80
|
@ -676,6 +676,7 @@ public:
|
|||
return DeclAccess == None ? Protected : AccessControl(DeclAccess);
|
||||
}
|
||||
|
||||
void setSynthesize(bool synth) { Synthesized = synth; }
|
||||
bool getSynthesize() const { return Synthesized; }
|
||||
|
||||
// Implement isa/cast/dyncast/etc.
|
||||
|
|
|
@ -2026,7 +2026,7 @@ Decl *ASTNodeImporter::VisitObjCIvarDecl(ObjCIvarDecl *D) {
|
|||
cast<ObjCContainerDecl>(DC),
|
||||
Loc, Name.getAsIdentifierInfo(),
|
||||
T, TInfo, D->getAccessControl(),
|
||||
BitWidth);
|
||||
BitWidth, D->getSynthesize());
|
||||
ToIvar->setLexicalDeclContext(LexicalDC);
|
||||
Importer.Imported(D, ToIvar);
|
||||
LexicalDC->addDecl(ToIvar);
|
||||
|
|
|
@ -378,6 +378,8 @@ void PCHDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) {
|
|||
void PCHDeclReader::VisitObjCIvarDecl(ObjCIvarDecl *IVD) {
|
||||
VisitFieldDecl(IVD);
|
||||
IVD->setAccessControl((ObjCIvarDecl::AccessControl)Record[Idx++]);
|
||||
bool synth = Record[Idx++];
|
||||
IVD->setSynthesize(synth);
|
||||
}
|
||||
|
||||
void PCHDeclReader::VisitObjCProtocolDecl(ObjCProtocolDecl *PD) {
|
||||
|
|
|
@ -363,6 +363,7 @@ void PCHDeclWriter::VisitObjCIvarDecl(ObjCIvarDecl *D) {
|
|||
VisitFieldDecl(D);
|
||||
// FIXME: stable encoding for @public/@private/@protected/@package
|
||||
Record.push_back(D->getAccessControl());
|
||||
Record.push_back(D->getSynthesize());
|
||||
Code = pch::DECL_OBJC_IVAR;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче