diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-23 03:23:08 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-23 03:23:08 +0000 |
commit | 8f36aba016c2d236a90f9ecf0a66904209202202 (patch) | |
tree | 5bf42b6f3bc3025e22d50be590aeb8f1f4f46c33 /lib/Sema/SemaDecl.cpp | |
parent | 10b0e1fa3aabd8877dbbc0df1f2414e04afd5fdd (diff) |
The ivars in an ObjCImplementationDecl are now stored in the
DeclContext rather than in a separate list. This makes PCH
(de-)serialization trivial, so that ivars can be loaded lazily.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 040c5467ac..c7a45dc9d7 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3952,7 +3952,12 @@ void Sema::ActOnFields(Scope* S, } else if (ObjCImplementationDecl *IMPDecl = dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) { assert(IMPDecl && "ActOnFields - missing ObjCImplementationDecl"); - IMPDecl->setIVarList(ClsFields, RecFields.size(), Context); + for (unsigned I = 0, N = RecFields.size(); I != N; ++I) { + // FIXME: Set the DeclContext correctly when we build the + // declarations. + ClsFields[I]->setLexicalDeclContext(IMPDecl); + IMPDecl->addDecl(Context, ClsFields[I]); + } CheckImplementationIvars(IMPDecl, ClsFields, RecFields.size(), RBrac); } } |