[cfe-commits] r69493 - /cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
Chris Lattner
sabre at nondot.org
Sat Apr 18 16:12:40 PDT 2009
Author: lattner
Date: Sat Apr 18 18:12:40 2009
New Revision: 69493
URL: http://llvm.org/viewvc/llvm-project?rev=69493&view=rev
Log:
"This patch fixes message sends to super in class methods for the GNU runtime (currently an instance method lookup is being performed)."
Patch by David Chisnall!
Modified:
cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
Modified: cfe/trunk/lib/CodeGen/CGObjCGNU.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjCGNU.cpp?rev=69493&r1=69492&r2=69493&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjCGNU.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjCGNU.cpp Sat Apr 18 18:12:40 2009
@@ -299,8 +299,9 @@
const ObjCInterfaceDecl *SuperClass = Class->getSuperClass();
// TODO: This should be cached, not looked up every time.
llvm::Value *ReceiverClass = GetClass(CGF.Builder, SuperClass);
-
-
+ if (IsClassMessage)
+ ReceiverClass = CGF.Builder.CreateBitCast(CGF.Builder.CreateLoad(
+ CGF.Builder.CreateStructGEP(ReceiverClass, 0)), IdTy);
// Construct the structure used to look up the IMP
llvm::StructType *ObjCSuperTy = llvm::StructType::get(Receiver->getType(),
IdTy, NULL);
More information about the cfe-commits
mailing list