Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / attr-btf_tag-disubprogram.c
blob86df8220aa5e1b8dde1c50130dfc8f7d7580365b
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 t1 {
8 int a;
9 };
11 int __tag1 __tag2 foo(struct t1 *arg) {
12 return arg->a;
15 // CHECK: distinct !DISubprogram(name: "foo", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], scopeLine: [[#]], flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: ![[#]], retainedNodes: ![[#]], annotations: ![[ANNOT:[0-9]+]])
16 // CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
17 // CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"tag1"}
18 // CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"tag2"}
20 int __tag1 __tag2 foo2(struct t1 *arg);
21 int foo2(struct t1 *arg) {
22 return arg->a;
25 // CHECK: distinct !DISubprogram(name: "foo2", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], scopeLine: [[#]], flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: ![[#]], retainedNodes: ![[#]], annotations: ![[ANNOT]])
27 int __tag1 foo3(struct t1 *arg);
28 int __tag2 foo3(struct t1 *arg) {
29 return arg->a;
32 // CHECK: distinct !DISubprogram(name: "foo3", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], scopeLine: [[#]], flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: ![[#]], retainedNodes: ![[#]], annotations: ![[ANNOT]])
34 int __tag1 foo4(struct t1 *arg);
35 int __tag2 foo4(struct t1 *arg);
36 int foo4(struct t1 *arg) {
37 return arg->a;
40 // CHECK: distinct !DISubprogram(name: "foo4", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], scopeLine: [[#]], flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: ![[#]], retainedNodes: ![[#]], annotations: ![[ANNOT]])