[llvm-dev] DebugInfo: purpose of align field

Victor Leschuk via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 3 23:52:20 PDT 2016


>
> Does COFF perhaps need the alignment?
I don't think it does, "git grep" says it has nothing to do with 
alignment. And according to autotests it doesn't need it.
>
>> 2) It'd be nice not to print the zero, to keep the textual 
>> representation simple/less noisy (as we do with many other metadata 
>> fields)
>
> I'm fine with not printing zero (Victor: ideally, this be a separate 
> commit).
That's already done before me, so no need for additional changes.
> I'm not so comfortable with not not printing any other values (such as 8).
That's the dilemma here: LLVM code doesn't know whether alignment was 
forced by programmer or it is default one (clang does know). The first 
approach I tried was to print all alignment values (old behavior) and 
mark forced alignment with special flag (in DIFlags). After that we 
decided that adding new flag is overkill here and we can use alignment 
value instead: if it set means it was forced, otherwise it is default 
(current behavior). I think we should stick with the latter one as it 
keeps code simpler.
>
> thanks for the explanation,
> adrian
>>
>> But it's not a big deal if someone else feels strongly.
>>
>> - Dave
>>
>>
>>     -- adrian
>>     _______________________________________________
>>     LLVM Developers mailing list
>>     llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>>     http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>

-- 
Best Regards,
Victor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161004/24a9a457/attachment.html>


More information about the llvm-dev mailing list