diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-09 21:04:52 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-09 21:04:52 +0000 |
commit | a66793ee8d2589ead81739d9b8a968650db3d452 (patch) | |
tree | 08bf49c9e69c2c71f016f5627a0f6f92979366b9 /lib/Sema/SemaDeclObjC.cpp | |
parent | 8fa73ed04dfad53696813cbd68058478d6c0becf (diff) |
This patch removes mergeProperties and does the property lookup
in designated protocols lazily.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 49a8c835c5..d47f98af25 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/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 |