summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-01-09 21:04:52 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-01-09 21:04:52 +0000
commit519976c4e92b635bf66e5ec469071d5ba5acf6ab (patch)
tree490ce62c0b75721af9b40270348bb6f2073f22bf /clang/lib/Sema/SemaDeclObjC.cpp
parentc1f5a659dea70e94c8053ec60f842a657fd955d7 (diff)
downloadbcm5719-llvm-519976c4e92b635bf66e5ec469071d5ba5acf6ab.tar.gz
bcm5719-llvm-519976c4e92b635bf66e5ec469071d5ba5acf6ab.zip
This patch removes mergeProperties and does the property lookup
in designated protocols lazily. llvm-svn: 62007
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 49a8c835c5c..d47f98af25f 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -340,7 +340,6 @@ Sema::ComparePropertiesInBaseAndSuper(ObjCInterfaceDecl *IDecl) {
void
Sema::MergeOneProtocolPropertiesIntoClass(Decl *CDecl,
ObjCProtocolDecl *PDecl) {
- llvm::SmallVector<ObjCPropertyDecl*, 16> mergeProperties;
ObjCInterfaceDecl *IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(CDecl);
if (!IDecl) {
// Category
@@ -355,14 +354,10 @@ Sema::MergeOneProtocolPropertiesIntoClass(Decl *CDecl,
CP != CE; ++CP)
if ((*CP)->getIdentifier() == Pr->getIdentifier())
break;
- if (CP == CE)
- // Add this property to list of properties for thie class.
- mergeProperties.push_back(Pr);
- else
+ if (CP != CE)
// Property protocol already exist in class. Diagnose any mismatch.
DiagnosePropertyMismatch((*CP), Pr, PDecl->getIdentifier());
}
- CatDecl->mergeProperties(&mergeProperties[0], mergeProperties.size());
return;
}
for (ObjCProtocolDecl::prop_iterator P = PDecl->prop_begin(),
@@ -374,14 +369,10 @@ Sema::MergeOneProtocolPropertiesIntoClass(Decl *CDecl,
CP != CE; ++CP)
if ((*CP)->getIdentifier() == Pr->getIdentifier())
break;
- if (CP == CE)
- // Add this property to list of properties for thie class.
- mergeProperties.push_back(Pr);
- else
+ if (CP != CE)
// Property protocol already exist in class. Diagnose any mismatch.
DiagnosePropertyMismatch((*CP), Pr, PDecl->getIdentifier());
}
- IDecl->mergeProperties(&mergeProperties[0], mergeProperties.size());
}
/// MergeProtocolPropertiesIntoClass - This routine merges properties
OpenPOWER on IntegriCloud