diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-22 16:33:55 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-06-22 16:33:55 +0000 |
commit | 6afbdf52563942cbf3d68c1cc0fcf590c94a47d3 (patch) | |
tree | 4de12a6ab330e9602de1feedd0fda54b38ee2447 /lib/CodeGen/CGObjCMac.cpp | |
parent | 9a20d55807cc2f6534a9c51a46cc8143ed16786d (diff) |
Fixes a problem in generation of meta-data for
category implementation whereby property list was missing.
NeXt ObjC runtime (radar 8093297).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index 801b1f2c18..fb3bec5ad8 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -1931,10 +1931,18 @@ llvm::Constant *CGObjCCommonMac::EmitPropertyList(llvm::Twine Name, Properties.push_back(llvm::ConstantStruct::get(ObjCTypes.PropertyTy, Prop)); } - if (const ObjCInterfaceDecl *OID = dyn_cast<ObjCInterfaceDecl>(OCD)) + if (const ObjCInterfaceDecl *OID = dyn_cast<ObjCInterfaceDecl>(OCD)) { for (ObjCInterfaceDecl::protocol_iterator P = OID->protocol_begin(), E = OID->protocol_end(); P != E; ++P) - PushProtocolProperties(PropertySet, Properties, Container, (*P), ObjCTypes); + PushProtocolProperties(PropertySet, Properties, Container, (*P), + ObjCTypes); + } + else if (const ObjCCategoryDecl *CD = dyn_cast<ObjCCategoryDecl>(OCD)) { + for (ObjCCategoryDecl::protocol_iterator P = CD->protocol_begin(), + E = CD->protocol_end(); P != E; ++P) + PushProtocolProperties(PropertySet, Properties, Container, (*P), + ObjCTypes); + } // Return null for empty list. if (Properties.empty()) |