forked from OSchip/llvm-project
NeXT: Emit lazy reference to Protocol class for forward protocol
references (to match gcc). llvm-svn: 55760
This commit is contained in:
parent
f2cf6d16e6
commit
7050c55415
|
@ -509,6 +509,11 @@ CodeGen::RValue CGObjCMac::EmitMessageSend(CodeGen::CodeGenFunction &CGF,
|
||||||
|
|
||||||
llvm::Value *CGObjCMac::GenerateProtocolRef(llvm::IRBuilder<> &Builder,
|
llvm::Value *CGObjCMac::GenerateProtocolRef(llvm::IRBuilder<> &Builder,
|
||||||
const ObjCProtocolDecl *PD) {
|
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),
|
return llvm::ConstantExpr::getBitCast(GetProtocolRef(PD),
|
||||||
ObjCTypes.ExternalProtocolPtrTy);
|
ObjCTypes.ExternalProtocolPtrTy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue