]> granicus.if.org Git - clang/commitdiff
Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised...
authorDavid Chisnall <csdavec@swan.ac.uk>
Wed, 21 Jul 2010 12:55:25 +0000 (12:55 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Wed, 21 Jul 2010 12:55:25 +0000 (12:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109010 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGObjCGNU.cpp

index faec7eeb3bbf7320a763690e9826ee2f2d834c7a..41c1a2a75066c3afa99b0993c464d9c44d6f083b 100644 (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());