r338321 - Fix use of uninitialized variable in r338299
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 31 09:18:56 PDT 2018
I think this version is right; the FieldOffset for OpenCL here will be 2
* getTypeSize(IntTy). The final `FieldOffset += FieldSize` that was
moved only applies to the non-OpenCL "__descriptor" field.
Scott
On 2018-07-30 19:22, Eric Christopher wrote:
> 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 [1]
>> 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
>> [2]
>>
> ==============================================================================
>> --- 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 [3]
>
>
> Links:
> ------
> [1] http://llvm.org/viewvc/llvm-project?rev=338321&view=rev
> [2]
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=338321&r1=338320&r2=338321&view=diff
> [3] http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list