[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / debug-info-extern-multi.c
blobc8a355be6837f44a2340f8c8852c9a28f0eae925
1 // RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
3 extern char ch;
4 int test(void) {
5 extern short sh;
6 return ch + sh;
9 extern char (*foo)(char);
10 int test2(void) {
11 return foo(0) + ch;
14 // CHECK: distinct !DIGlobalVariable(name: "ch",{{.*}} type: ![[Tch:[0-9]+]], isLocal: false, isDefinition: false
15 // CHECK: distinct !DIGlobalVariable(name: "sh",{{.*}} type: ![[Tsh:[0-9]+]], isLocal: false, isDefinition: false
16 // CHECK: ![[Tsh]] = !DIBasicType(name: "short", size: 16, encoding: DW_ATE_signed)
18 // CHECK: distinct !DIGlobalVariable(name: "foo",{{.*}} type: ![[Tptr:[0-9]+]], isLocal: false, isDefinition: false
19 // ![[Tptr]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[Tsub:[0-9]+]], size: 64)
20 // ![[Tsub]] = !DISubroutineType(types: ![[Tproto:[0-9]+]])
21 // ![[Tproto]] = !{![[Tch]], ![[Tch]]}
22 // CHECK: ![[Tch]] = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)