[PATCH] D100629: [Debug-Info][DBX] DW_AT_alignment should not be generated when dwarf version is not 5

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 18 21:21:33 PDT 2021


shchenz added a comment.

In D100629#2696041 <https://reviews.llvm.org/D100629#2696041>, @dblaikie wrote:

> As @probinson mentioned in https://reviews.llvm.org/D99250#2651953
>
>> Our practice has been for a "tuning" option to, effectively, expand into other options to control various bits of behavior.  Basically, there should never be behavior that can be controlled _only_ via the tuning option.  This is a design decision that was debated at length when we introduced tuning.
>
> (@probinson - do we have that written down somewhere?)
>
> So this would have to be changed to add an LLVM flag (only has to be added in DwarfDebug.cpp, most likely - it doesn't have to be a published flag for Clang, and probably shouldn't be)
>
> But this probably gets into Paul's suggestion that it might be easier to add one strict mode flag ( https://reviews.llvm.org/D100630#2694681 ) to group all this (I wouldn't mind adding that as a single flag in DwarfDebug.cpp for now - whether or not that gets plumbed up through into a CLang flag should probably be handled separately, but would be easy enough to do) under.

Thanks @dblaikie . Yes, I will change these patches according to Paul's suggestion. But seems we have to add this flag as a clang flag. For some cases, the mismatched DWARF infos are generated in clang FE. See D100630 <https://reviews.llvm.org/D100630>. BTW, do you know why there are two options `-gstrict-dwarf`, `-gno-strict-dwarf` but with no users in clang options list? Are these options used to check the DWARF infos are generated in the right DWARF version? Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100629/new/

https://reviews.llvm.org/D100629



More information about the llvm-commits mailing list