[llvm-dev] DebugInfo: purpose of align field

Adrian Prantl via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 4 08:15:54 PDT 2016


> On Oct 3, 2016, at 11:52 PM, Victor Leschuk <vleschuk at accesssoftek.com> wrote:
> 
> 
>> 
>> 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.

If no one else needs the alignment, I'm fine with taking this approach. Please be sure to document all this in SourceLevelDebugging.rst.

thanks!
adrian
>> 
>> 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 <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/bf6ca42c/attachment.html>


More information about the llvm-dev mailing list