r338321 - Fix use of uninitialized variable in r338299

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


Is 0 right for FieldOffset for OpenCL here? Seems a little odd.

-eric

On Mon, Jul 30, 2018 at 3:56 PM Scott Linder via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: scott.linder
> Date: Mon Jul 30 15:52:07 2018
> New Revision: 338321
>
> URL: http://llvm.org/viewvc/llvm-project?rev=338321&view=rev
> Log:
> Fix use of uninitialized variable in r338299
>
> 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=338321&r1=338320&r2=338321&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Jul 30 15:52:07 2018
> @@ -989,9 +989,9 @@ llvm::DIType *CGDebugInfo::CreateType(co
>      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
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180730/14de91ac/attachment.html>


More information about the cfe-commits mailing list