<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/73623>73623</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            DebugInfo: No alignment info for "transitive" alignment-enforced structures.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lldb,
            debuginfo
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          hokein
      </td>
    </tr>
</table>

<pre>
    Split from #72913.

Consider the following case:

```C++
struct alignas(8) Base {} a;

struct Derived : Base {} b;
```

Debug info emitted by clang  `./bin/clang -cc1 -emit-llvm -debug-info-kind=limited /tmp/t.cpp -o -`
```
!8 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Derived", file: !7, line: 4, size: 64, flags: DIFlagTypePassByValue, elements: !9, identifier: "_ZTS7Derived")
!9 = !{!10}
!10 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !8, baseType: !11, extraData: i32 0)
!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Base", file: !7, line: 2, size: 64, align: 64, flags: DIFlagTypePassByValue, elements: !12, identifier: "_ZTS4Base")
```

The `DICompositeType` for `Derived` is missing the `align` attribute, it is a critical information for lldb to get correct layout for the structure.

This is a regression caused by https://reviews.llvm.org/D24426.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVM2O6zYPfRp5IziwqMR2Fl5MxvCH2XwocAct0M1AlhmHvbIVSPLcpk9fSM4kmdu_RQsEDkRSh4eHpJT3NM6IDdsd2K7N1BJO1jUn-xVpzno7XJovZ0OBH52dOANZwV7IDStaVjyt32c7exrQ8XBCfrTG2G80j1wrj0w-PUayslh_zwwO8ZesPrhFB64MjbPyDOqawZ4flEfOqgOrWq6YPDziXG-06OgdB87k06fw_h7-kfDxdov9MnKaj5bjRCHgwPsL10bNI-esLDYMup5mBt1qy7UWPI-huTHvE8-HCJBHgPwrzQOTraGJIg6DLkzn-N3o85nnluf35N9xAVFzJls-kA8068AZiPbl2U5n6yng6-WMDOqgxlhe-9Pb69P_3tbCF4dvIbmf-aymqDJnAFc5GEB0HMlcHaKKZ0NzOm_jwdNv6VCm09Go0acsL51RY8z8g_L-cPlRmSVlQYMTzsFfAffRRgPOgY6E7pr_7efXL9Ujif2t0n2qlIGIHQIhCla1N6coPrzty_X6nxZP8wkdBTXrxMlre_6osI6GXvlVtdUmRGL-a3CqVUFFK0ngxSMvIf7bFsQp_Af94Y_6p8n_F-0Q8Jf92N4Y7f9mI15PGAf_-9LLgh-tS55rV8uCk-cTeR83PKzXVvplwVUIjvolJI4UYqji2lEgrUxaODepQHZOsMYMPQ-Wjxi4ts6hDtyoi11Cckfwm9abz2zJr9gOR4feR0StFr8u8imEc1SGQcegc_hO-M1v4uZurBsZdC1st1B-gsyGRg57uVcZNqIqhCjFVtTZqan0cKzKodZQlkrKXSkRdriVFVSFrLDKqIECpBBQF_WuEPVGKAnVcajKGiosh4ptC5wUmRuDjLxfsKlkCTIzqkfj0-MLEBVZp4cBpEcmahYtuzZzTQTI-2X0bFsY8uFeVBYoGGzSw_YSr8gn_n-7zlUclPWxS70ECE7NngK9x7m4x-QY-6NxuKvuN9niTPNZ0JHCaek32k4Mukjg-pefnf0FdWDQpQI9gy7V-HsAAAD__2Sv6b0">