diff options
author | John McCall <rjmccall@apple.com> | 2010-10-28 21:37:57 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-10-28 21:37:57 +0000 |
commit | 46ec70e2e6541a067d33b2513505bec74582b53c (patch) | |
tree | 7dd72398444fc34975e4a2a4fbdd0b2e2acfedf0 /lib/CodeGen/CGBlocks.cpp | |
parent | b14eed0ed44ed3af881219dab7dc6464cad5303b (diff) |
When emitting l-values for bool non-__block decl references, make a pointer
using the memory type; fixes an assert.
Fixes rdar://problem/8605032
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | lib/CodeGen/CGBlocks.cpp | 2 |
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()) |