summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-11-17 00:21:28 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-11-17 00:21:28 +0000
commita00076cda5ed9dec83b851f165eb335782d71d92 (patch)
treed19e985f3b7f378d519b91d1bf8214a9b8b372f8 /clang/lib/CodeGen/CGBlocks.cpp
parent68dbaead7b3ecd2a13e38488e4aa32c363733d4d (diff)
downloadbcm5719-llvm-a00076cda5ed9dec83b851f165eb335782d71d92.tar.gz
bcm5719-llvm-a00076cda5ed9dec83b851f165eb335782d71d92.zip
Fixes synthesis of type for the object which holds info.
about a __block cxx object. llvm-svn: 119411
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index e21664607cf..c40cfaf6a97 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -1016,9 +1016,8 @@ GenerateCopyHelperFunction(const llvm::StructType *T,
Srcv = Builder.CreateBitCast(Srcv, PtrStructTy);
Srcv = Builder.CreateStructGEP(Srcv, CGF.getByRefValueLLVMField(VD),
VD->getNameAsString());
- Dstv = Builder.CreateStructGEP(DstObj, index);
- Dstv = Builder.CreateLoad(Dstv);
- Dstv = Builder.CreateBitCast(Dstv, PtrStructTy);
+
+ Dstv = Builder.CreateBitCast(DstObj, PtrStructTy);
Dstv = Builder.CreateStructGEP(Dstv, CGF.getByRefValueLLVMField(VD),
VD->getNameAsString());
CGF.EmitSynthesizedCXXCopyCtor(Dstv, Srcv,
OpenPOWER on IntegriCloud