NeXT: Emit lazy reference to Protocol class for forward protocol

references (to match gcc).

llvm-svn: 55760
This commit is contained in:
Daniel Dunbar 2008-09-04 04:33:15 +00:00
parent f2cf6d16e6
commit 7050c55415
1 changed files with 5 additions and 0 deletions

View File

@ -509,6 +509,11 @@ CodeGen::RValue CGObjCMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF,
llvm::Value *CGObjCMac::GenerateProtocolRef(llvm::IRBuilder<> &Builder,
const ObjCProtocolDecl *PD) {
// FIXME: I don't understand why gcc generates this, or where it is
// resolved. Investigate. Its also wasteful to look this up over and
// over.
LazySymbols.insert(&CGM.getContext().Idents.get("Protocol"));
return llvm::ConstantExpr::getBitCast(GetProtocolRef(PD),
ObjCTypes.ExternalProtocolPtrTy);
}