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")))
10 struct t1 g1 __tag1 __tag2
;
12 extern struct t1 g2 __tag1 __tag2
;
15 // CHECK: distinct !DIGlobalVariable(name: "g1", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], isLocal: false, isDefinition: true, annotations: ![[ANNOT:[0-9]+]])
16 // CHECK: distinct !DIGlobalVariable(name: "g2", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], isLocal: false, isDefinition: true, annotations: ![[ANNOT]])
17 // CHECK: ![[ANNOT]] = !{![[TAG1:[0-9]+]], ![[TAG2:[0-9]+]]}
18 // CHECK: ![[TAG1]] = !{!"btf_decl_tag", !"tag1"}
19 // CHECK: ![[TAG2]] = !{!"btf_decl_tag", !"tag2"}
21 extern struct t1 g3 __tag1
;
24 // CHECK: distinct !DIGlobalVariable(name: "g3", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], isLocal: false, isDefinition: true, annotations: ![[ANNOT]])
27 struct t1 g4 __tag1 __tag2
;
29 // CHECK: distinct !DIGlobalVariable(name: "g4", scope: ![[#]], file: ![[#]], line: [[#]], type: ![[#]], isLocal: false, isDefinition: true, annotations: ![[ANNOT]])