From b999e4b0b8c73b27c601d9ef76a328bf558be797 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 30 Jul 2018 23:17:27 +0000 Subject: [PATCH] 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 --- lib/CodeGen/CGDebugInfo.cpp | 1 + 1 file changed, 1 insertion(+) 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); -- 2.50.1