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 | 5f66205233d33dcc36f8f804a689358ed49740af (patch) | |
tree | 435ff82a2955a121af89348582c24ab933fa8cd8 /clang/lib/Sema | |
parent | 510fd8dff13f64f1389cfcaf0a30706896d1b4ce (diff) | |
download | bcm5719-llvm-5f66205233d33dcc36f8f804a689358ed49740af.tar.gz bcm5719-llvm-5f66205233d33dcc36f8f804a689358ed49740af.zip |
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.
llvm-svn: 69857
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 040c5467ac5..c7a45dc9d70 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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); } } |