Add a definition for FieldSize that seems to make sense here.

This could be sunk out of the if statements, but fix the warning for now.

llvm-svn: 338327
This commit is contained in:
Eric Christopher 2018-07-30 23:17:27 +00:00
parent f35ff042f4
commit 8f02a9ed3c
1 changed files with 1 additions and 0 deletions

View File

@ -974,6 +974,7 @@ llvm::DIType *CGDebugInfo::CreateType(const BlockPointerType *Ty,
if (CGM.getLangOpts().OpenCL) { if (CGM.getLangOpts().OpenCL) {
FType = CGM.getContext().IntTy; FType = CGM.getContext().IntTy;
EltTys.push_back(CreateMemberType(Unit, FType, "__size", &FieldOffset)); EltTys.push_back(CreateMemberType(Unit, FType, "__size", &FieldOffset));
FieldSize = CGM.getContext().getTypeSize(Ty);
EltTys.push_back(CreateMemberType(Unit, FType, "__align", &FieldOffset)); EltTys.push_back(CreateMemberType(Unit, FType, "__align", &FieldOffset));
} else { } else {
FType = CGM.getContext().getPointerType(CGM.getContext().VoidTy); FType = CGM.getContext().getPointerType(CGM.getContext().VoidTy);