]> granicus.if.org Git - clang/commitdiff
Fix -forwardingTargetForSelector: (GNUstep runtime) which was broken for the
authorDavid Chisnall <csdavec@swan.ac.uk>
Thu, 1 Dec 2011 18:40:09 +0000 (18:40 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Thu, 1 Dec 2011 18:40:09 +0000 (18:40 +0000)
old dispatch mechanism when I introduced the new one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145609 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCGNU.cpp

index b6e07ab83df6ed527f020a194676a68b7a532a89..0a207ab76d545ff72a7c156f51c4bce22170faf1 100644 (file)
@@ -1196,6 +1196,8 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction &CGF,
       }
   }
 
+  // Reset the receiver in case the lookup modified it
+  ActualArgs[0] = CallArg(RValue::get(Receiver), ASTIdTy, false);
 
   llvm::FunctionType *impType =
     Types.GetFunctionType(FnInfo, Method ? Method->isVariadic() : false);