[PATCH] D24425: DebugInfo: support for DWARFv5 DW_AT_alignment attribute
Victor Leschuk via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 20:23:09 PDT 2016
vleschuk added a comment.
In https://reviews.llvm.org/D24425#539028, @dblaikie wrote:
> What's the purpose of the flag? Could we just use the non-zero value of the alignment attribute as the signal of whether to emit the DW_AT_alignment attribute? (eg: if the alignment is specified, emit it - simple?)
The alignment could be not specified and default alignment is used. Consider the following example:
struct S {
} s;
This will result in the following IR code:
!5 = !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !1, line: 1, align: 8, elements: !2)
And getAlignInBits() will return 8. Thus we need to mark entities with non-default alignment.
https://reviews.llvm.org/D24425
More information about the llvm-commits
mailing list