diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-10 18:47:34 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-10 18:47:34 +0000 |
commit | 960cd06eab1325071d331b462553c9e4135c926e (patch) | |
tree | 1b1c6733f68bfedfc5bf58dbde22ceae2ce09b70 /lib/CodeGen/CGObjCMac.cpp | |
parent | a1e2fd9b580ae583b91d3288d59c00ca9f6a56b8 (diff) |
Patch to generate meta-data for prtocol used
in @protocol expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68806 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index a06959f1de..ae70dc568b 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -4327,7 +4327,10 @@ void CGObjCNonFragileABIMac::GenerateClass(const ObjCImplementationDecl *ID) { llvm::Value *CGObjCNonFragileABIMac::GenerateProtocolRef(CGBuilderTy &Builder, const ObjCProtocolDecl *PD) { - llvm::Constant *Init = llvm::ConstantExpr::getBitCast(GetProtocolRef(PD), + // This routine is called for @protocol only. So, we must build definition + // of protocol's meta-data (not a reference to it!) + // + llvm::Constant *Init = llvm::ConstantExpr::getBitCast(GetOrEmitProtocol(PD), ObjCTypes.ExternalProtocolPtrTy); std::string ProtocolName("\01l_OBJC_PROTOCOL_REFERENCE_$_"); |