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

Eric Christopher via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 30 16:17:27 PDT 2018


Author: echristo
Date: Mon Jul 30 16:17:27 2018
New Revision: 338327

URL: http://llvm.org/viewvc/llvm-project?rev=338327&view=rev
Log:
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.

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=338327&r1=338326&r2=338327&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Jul 30 16:17:27 2018
@@ -974,6 +974,7 @@ llvm::DIType *CGDebugInfo::CreateType(co
   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);




More information about the cfe-commits mailing list