diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-11-14 17:15:51 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-11-14 17:15:51 +0000 |
commit | 3ca23d7dc6cb61e6f363a58d9256d548199d120c (patch) | |
tree | 00205162a72e02a72fb4ac29effdb1648560aeae /lib/CodeGen/CGDebugInfo.cpp | |
parent | accaf19bc1129c0273ec50dba52318e60bc29103 (diff) |
objective-C blocks: Provide layout map for byref
variables captured in a block. // rdar://12184410
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 80fa09be74..1d9f8ed146 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2256,6 +2256,12 @@ llvm::DIType CGDebugInfo::EmitTypeForVarWithBlocksAttr(const ValueDecl *VD, EltTys.push_back(CreateMemberType(Unit, FType, "__destroy_helper", &FieldOffset)); } + bool HasByrefExtendedLayout; + Qualifiers::ObjCLifetime Lifetime; + if (CGM.getContext().getByrefLifetime(Type, Lifetime, HasByrefExtendedLayout) && + HasByrefExtendedLayout) + EltTys.push_back(CreateMemberType(Unit, FType, "__byref_variable_layout", + &FieldOffset)); CharUnits Align = CGM.getContext().getDeclAlign(VD); if (Align > CGM.getContext().toCharUnitsFromBits( |