r186898 - Implement a better fix for r186894 by setting the appropriate type for __byref_variable_layout.
Adrian Prantl
aprantl at apple.com
Mon Jul 22 17:12:14 PDT 2013
Author: adrian
Date: Mon Jul 22 19:12:14 2013
New Revision: 186898
URL: http://llvm.org/viewvc/llvm-project?rev=186898&view=rev
Log:
Implement a better fix for r186894 by setting the appropriate type for __byref_variable_layout.
rdar://problem/14386148
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=186898&r1=186897&r2=186898&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Jul 22 19:12:14 2013
@@ -2599,10 +2599,12 @@ llvm::DIType CGDebugInfo::EmitTypeForVar
Qualifiers::ObjCLifetime Lifetime;
if (CGM.getContext().getByrefLifetime(Type,
Lifetime, HasByrefExtendedLayout)
- && HasByrefExtendedLayout)
+ && HasByrefExtendedLayout) {
+ FType = CGM.getContext().getPointerType(CGM.getContext().VoidTy);
EltTys.push_back(CreateMemberType(Unit, FType,
"__byref_variable_layout",
&FieldOffset));
+ }
CharUnits Align = CGM.getContext().getDeclAlign(VD);
if (Align > CGM.getContext().toCharUnitsFromBits(
@@ -2626,7 +2628,6 @@ llvm::DIType CGDebugInfo::EmitTypeForVar
llvm::DIType FieldTy = CGDebugInfo::getOrCreateType(FType, Unit);
FieldSize = CGM.getContext().getTypeSize(FType);
FieldAlign = CGM.getContext().toBits(Align);
- FieldOffset += FieldOffset % FieldAlign;
*XOffset = FieldOffset;
FieldTy = DBuilder.createMemberType(Unit, VD->getName(), Unit,
More information about the cfe-commits
mailing list