aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-17 21:40:49 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-17 21:40:49 +0000
commita769c004a2874504c17ea8afccbc4ad35fc33c9f (patch)
tree8b99e51cf54df41037797a650475ecd17322fa53 /lib/Sema
parentb60d7999d621fce608e03d39e82c0e7eda750054 (diff)
This patch will build the Records lazily per Steve's comments.
Note that one test duplicate-ivar-check.m will fail because I need to re-implement duplicate ivar checking. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61154 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDecl.cpp3
-rw-r--r--lib/Sema/SemaDeclObjC.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 6ef9ecd817..5ae266ef00 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3029,7 +3029,7 @@ void Sema::ActOnFields(Scope* S,
ObjCIvarDecl **ClsFields = reinterpret_cast<ObjCIvarDecl**>(&RecFields[0]);
if (ObjCInterfaceDecl *ID = dyn_cast<ObjCInterfaceDecl>(EnclosingDecl)) {
ID->addInstanceVariablesToClass(ClsFields, RecFields.size(), RBrac);
- ID->addRecordToClass(Context);
+#if 0
// Must enforce the rule that ivars in the base classes may not be
// duplicates.
FieldIDs.clear();
@@ -3049,6 +3049,7 @@ void Sema::ActOnFields(Scope* S,
}
}
}
+#endif
}
else if (ObjCImplementationDecl *IMPDecl =
dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) {
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 5887f29d4f..d4cef9b0de 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -599,7 +599,6 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl,
/// Add implementations's ivar to the synthesize class's ivar list.
if (IDecl->ImplicitInterfaceDecl()) {
IDecl->addInstanceVariablesToClass(ivars, numIvars, RBrace);
- IDecl->addRecordToClass(Context);
return;
}
// If implementation has empty ivar list, just return.