[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / attr-btf_tag-dicomposite.c
blobbe31d95cc05c87093035c89bb3ceecae2595e8ef
1 // REQUIRES: x86-registered-target
2 // RUN: %clang -target x86_64 -g -S -emit-llvm -o - %s | FileCheck %s
4 #define __tag1 __attribute__((btf_decl_tag("tag1")))
5 #define __tag2 __attribute__((btf_decl_tag("tag2")))
7 struct __tag1 __tag2 t1;
8 struct t1 {
9 int a;
12 int foo(struct t1 *arg) {
13 return arg->a;
16 // CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1", file: ![[#]], line: [[#]], size: 32, elements: ![[#]], annotations: ![[ANNOT:[0-9]+]])
17 // CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
18 // CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"tag1"}
19 // CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"tag2"}
21 struct __tag1 t2;
22 struct __tag2 t2 {
23 int a;
26 int foo2(struct t2 *arg) {
27 return arg->a;
30 // CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t2", file: ![[#]], line: [[#]], size: 32, elements: ![[#]], annotations: ![[ANNOT]])
32 struct __tag1 t3;
33 struct t3 {
34 int a;
35 } __tag2;
37 int foo3(struct t3 *arg) {
38 return arg->a;
41 // CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t3", file: ![[#]], line: [[#]], size: 32, elements: ![[#]], annotations: ![[ANNOT]])
43 struct t4;
44 struct t4 {
45 int a;
46 } __tag1 __tag2;
48 int foo4(struct t4 *arg) {
49 return arg->a;
52 // CHECK: distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t4", file: ![[#]], line: [[#]], size: 32, elements: ![[#]], annotations: ![[ANNOT]])