summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2008-09-04 04:33:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2008-09-04 04:33:15 +0000
commit7050c554150f2f34e23eac117c406a15265ca0c7 (patch)
treebdd99c58b083a6a20c1bbf7590f749d3b97d9ce4
parentf2cf6d16e6046233b05728a64119c69709e682ed (diff)
downloadbcm5719-llvm-7050c554150f2f34e23eac117c406a15265ca0c7.tar.gz
bcm5719-llvm-7050c554150f2f34e23eac117c406a15265ca0c7.zip
NeXT: Emit lazy reference to Protocol class for forward protocol
references (to match gcc). llvm-svn: 55760
-rw-r--r--clang/lib/CodeGen/CGObjCMac.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjCMac.cpp b/clang/lib/CodeGen/CGObjCMac.cpp
index d1a16512771..9638bc14308 100644
--- a/clang/lib/CodeGen/CGObjCMac.cpp
+++ b/clang/lib/CodeGen/CGObjCMac.cpp
@@ -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);
}
OpenPOWER on IntegriCloud