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);
 }


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to