[all-commits] [llvm/llvm-project] b09ba4: Bug 51277: [DWARF] DW_AT_alignment incorrect when
MaggieYingYi via All-commits
all-commits at lists.llvm.org
Fri Apr 22 04:16:19 PDT 2022
Author: Ying Yi <maggieyi868 at gmail.com>
Date: 2022-04-22 (Fri, 22 Apr 2022)
Bug 51277: [DWARF] DW_AT_alignment incorrect when
attribute((__aligned__)) is present but ignored`
In the original code, the 'getDeclAlignIfRequired' function is used.
The 'getDeclAlignIfRequired' function will return the max alignment
of all aligned attributes if the type has aligned attributes. The
function doesn't consider the type at all.
The 'getTypeAlignIfRequired' function uses the type's alignment value,
which also used by the 'alignof' function. I think we should use the
function of 'getTypeAlignIfRequired'.
Reviewed By: dblaikie, jmorse, wolfgangp
Differential Revision: https://reviews.llvm.org/D124006
More information about the All-commits