From: David Chisnall Date: Wed, 21 Jul 2010 12:55:25 +0000 (+0000) Subject: Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41d0c7a2355c1a47b33f5e528c5f815ca5b52e9e;p=clang Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised away (GNU runtime). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109010 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGObjCGNU.cpp b/lib/CodeGen/CGObjCGNU.cpp index faec7eeb3b..41c1a2a750 100644 --- a/lib/CodeGen/CGObjCGNU.cpp +++ b/lib/CodeGen/CGObjCGNU.cpp @@ -722,8 +722,8 @@ CGObjCGNU::GenerateMessageSend(CodeGen::CodeGenFunction &CGF, // The lookup function may have changed the receiver, so make sure we use // the new one. - ActualArgs[0] = - std::make_pair(RValue::get(Builder.CreateLoad(ReceiverPtr)), ASTIdTy); + ActualArgs[0] = std::make_pair(RValue::get( + Builder.CreateLoad(ReceiverPtr, true)), ASTIdTy); } else { std::vector Params; Params.push_back(Receiver->getType());