aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-01-05 00:32:13 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-01-05 00:32:13 +0000
commitba3c9ca16b3992248ec654ce9ec8c841c1c6d1e9 (patch)
tree2b6a7b26fc785dc5e242fda20b64cbc4906814f9 /lib/CodeGen/CGBlocks.cpp
parentdf0be6d03beffabd3449216f036db65cae60c2ad (diff)
In my last patch initialize the destination to null (with a simple store) before doing a storeStrong to it.
// rdar://12530881 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index e33e664430..84d8808bb3 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -1566,6 +1566,8 @@ public:
llvm::ConstantPointerNull::get(cast<llvm::PointerType>(value->getType()));
if (CGF.CGM.getCodeGenOpts().OptimizationLevel == 0) {
+ llvm::StoreInst *store = CGF.Builder.CreateStore(null, destField);
+ store->setAlignment(Alignment.getQuantity());
CGF.EmitARCStoreStrongCall(destField, value, /*ignored*/ true);
CGF.EmitARCStoreStrongCall(srcField, null, /*ignored*/ true);
return;