diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 20:51:19 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-05-04 20:51:19 +0000 |
commit | 7e411337c0ed226dace6e07f1420486768161308 (patch) | |
tree | 938fcb7c80a0402925b5b00fa684a245ab0936a5 /lib/CodeGen/CGBlocks.cpp | |
parent | 8aaf5818a64e9f7687798852af5945b053c68a54 (diff) | |
download | FreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.zip FreeBSD-src-7e411337c0ed226dace6e07f1420486768161308.tar.gz |
Update clang to r103052.
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index db24def..8082b33 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -532,6 +532,8 @@ llvm::Value *CodeGenFunction::GetAddrOfBlockDecl(const BlockDeclRefExpr *E) { V = Builder.CreateBitCast(V, PtrStructTy); V = Builder.CreateStructGEP(V, getByRefValueLLVMField(VD), VD->getNameAsString()); + if (VD->getType()->isReferenceType()) + V = Builder.CreateLoad(V); } else { const llvm::Type *Ty = CGM.getTypes().ConvertType(VD->getType()); |