Add a definition for FieldSize that seems to make sense here.
authorEric Christopher <echristo@gmail.com>
Mon, 30 Jul 2018 23:17:27 +0000 (23:17 +0000)
committerEric Christopher <echristo@gmail.com>
Mon, 30 Jul 2018 23:17:27 +0000 (23:17 +0000)
This could be sunk out of the if statements, but fix the warning for now.

llvm-svn: 338327

clang/lib/CodeGen/CGDebugInfo.cpp

index 5be6fb3..4f2b153 100644 (file)
@@ -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);