aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index ca78781ec6..44e0833daf 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -611,7 +611,7 @@ llvm::Value *CodeGenFunction::GetAddrOfBlockDecl(const ValueDecl *VD,
if (VD->getType()->isReferenceType())
V = Builder.CreateLoad(V);
} else {
- const llvm::Type *Ty = CGM.getTypes().ConvertType(VD->getType());
+ const llvm::Type *Ty = CGM.getTypes().ConvertTypeForMem(VD->getType());
Ty = llvm::PointerType::get(Ty, 0);
V = Builder.CreateBitCast(V, Ty);
if (VD->getType()->isReferenceType())