From: Scott Linder Date: Mon, 30 Jul 2018 22:52:07 +0000 (+0000) Subject: Fix use of uninitialized variable in r338299 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7709b0bcd2430aa7274537529f370e326e79497;p=clang Fix use of uninitialized variable in r338299 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@338321 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 8dca6f1ef7..5be6fb3e42 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -989,9 +989,9 @@ llvm::DIType *CGDebugInfo::CreateType(const BlockPointerType *Ty, EltTys.push_back(DBuilder.createMemberType( Unit, "__descriptor", nullptr, LineNo, FieldSize, FieldAlign, FieldOffset, llvm::DINode::FlagZero, DescTy)); + FieldOffset += FieldSize; } - FieldOffset += FieldSize; Elements = DBuilder.getOrCreateArray(EltTys); // The __block_literal_generic structs are marked with a special