[cfe-commits] r55760 - /cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Daniel Dunbar
daniel at zuster.org
Wed Sep 3 21:33:16 PDT 2008
Author: ddunbar
Date: Wed Sep 3 23:33:15 2008
New Revision: 55760
URL: http://llvm.org/viewvc/llvm-project?rev=55760&view=rev
Log:
NeXT: Emit lazy reference to Protocol class for forward protocol
references (to match gcc).
Modified:
cfe/trunk/lib/CodeGen/CGObjCMac.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCMac.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCMac.cpp?rev=55760&r1=55759&r2=55760&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCMac.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCMac.cpp Wed Sep 3 23:33:15 2008
@@ -509,6 +509,11 @@
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);
}
More information about the cfe-commits
mailing list