1 // Test for debug info related to DW_AT_alignment attribute in the struct type.
2 // RUN: %clang_cc1 -dwarf-version=5 -debug-info-kind=standalone -S -emit-llvm %s -o - | FileCheck %s
4 // CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType", {{.*}}, align: 32
5 // CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType1", {{.*}}, align: 8
6 // CHECK-DAG: DICompositeType(tag: DW_TAG_structure_type, name: "MyType2", {{.*}}, align: 8
10 } __attribute__((aligned(1)));
13 static_assert(alignof(MyType
) == 4, "alignof MyType is wrong");
17 } __attribute__((packed
, aligned(1)));
20 static_assert(alignof(MyType1
) == 1, "alignof MyType1 is wrong");
23 __attribute__((packed
)) int m
;
24 } __attribute__((aligned(1)));
27 static_assert(alignof(MyType2
) == 1, "alignof MyType2 is wrong");