aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-16 21:23:50 +0000
committerChris Lattner <sabre@nondot.org>2008-03-16 21:23:50 +0000
commit55d13b4d5530a14d5baa72adab32ae78ba256caf (patch)
tree9837795b9f69932113adae6bc639be31029be0a1 /lib/Sema/SemaDeclObjC.cpp
parentf8d17a59167d9c2026506ed8813ea434d93b662a (diff)
make property addition work list all other "add" methods. Do
the allocation in the class, not in sema. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 121004db99..335122ebfa 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -705,13 +705,8 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl,
// TODO: property declaration in category and protocols.
if (pNum != 0)
- if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl)) {
- // FIXME: Move the memory allocation into setPropertyDecls!
- ObjCPropertyDecl **properties = new ObjCPropertyDecl*[pNum];
- memcpy(properties, allProperties, pNum*sizeof(ObjCPropertyDecl*));
- IDecl->setPropertyDecls(properties);
- IDecl->setNumPropertyDecl(pNum);
- }
+ if (ObjCInterfaceDecl *IDecl = dyn_cast<ObjCInterfaceDecl>(ClassDecl))
+ IDecl->addProperties((ObjCPropertyDecl**)allProperties, pNum);
for (unsigned i = 0; i < allNum; i++ ) {
ObjCMethodDecl *Method =