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: http://review.tizen.org/git/?a=commitdiff_plain;h=8f02a9ed3ce4ec720983461df00bb4ebea89fb23;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 5be6fb3..4f2b153 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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);