From: Eric Christopher Date: Mon, 30 Jul 2018 23:17:27 +0000 (+0000) Subject: Add a definition for FieldSize that seems to make sense here. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b999e4b0b8c73b27c601d9ef76a328bf558be797;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338327 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 5be6fb3e42..4f2b153e96 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -974,6 +974,7 @@ llvm::DIType *CGDebugInfo::CreateType(const BlockPointerType *Ty, if (CGM.getLangOpts().OpenCL) { FType = CGM.getContext().IntTy; EltTys.push_back(CreateMemberType(Unit, FType, "__size", &FieldOffset)); + FieldSize = CGM.getContext().getTypeSize(Ty); EltTys.push_back(CreateMemberType(Unit, FType, "__align", &FieldOffset)); } else { FType = CGM.getContext().getPointerType(CGM.getContext().VoidTy);