Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised away (GNU runtime).

llvm-svn: 109010
This commit is contained in:
David Chisnall 2010-07-21 12:55:25 +00:00
parent 4277e14dc4
commit 7fa204edc7
1 changed files with 2 additions and 2 deletions

View File

@ -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<const llvm::Type*> Params;
Params.push_back(Receiver->getType());