annotate clang/test/CodeGen/debug-info-extern-multi.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 extern char ch;
anatofuz
parents:
diff changeset
4 int test() {
anatofuz
parents:
diff changeset
5 extern short sh;
anatofuz
parents:
diff changeset
6 return ch + sh;
anatofuz
parents:
diff changeset
7 }
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 extern char (*foo)(char);
anatofuz
parents:
diff changeset
10 int test2() {
anatofuz
parents:
diff changeset
11 return foo(0) + ch;
anatofuz
parents:
diff changeset
12 }
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 // CHECK: distinct !DIGlobalVariable(name: "ch",{{.*}} type: ![[Tch:[0-9]+]], isLocal: false, isDefinition: false
anatofuz
parents:
diff changeset
15 // CHECK: distinct !DIGlobalVariable(name: "sh",{{.*}} type: ![[Tsh:[0-9]+]], isLocal: false, isDefinition: false
anatofuz
parents:
diff changeset
16 // CHECK: ![[Tsh]] = !DIBasicType(name: "short", size: 16, encoding: DW_ATE_signed)
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 // CHECK: distinct !DIGlobalVariable(name: "foo",{{.*}} type: ![[Tptr:[0-9]+]], isLocal: false, isDefinition: false
anatofuz
parents:
diff changeset
19 // ![[Tptr]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[Tsub:[0-9]+]], size: 64)
anatofuz
parents:
diff changeset
20 // ![[Tsub]] = !DISubroutineType(types: ![[Tproto:[0-9]+]])
anatofuz
parents:
diff changeset
21 // ![[Tproto]] = !{![[Tch]], ![[Tch]]}
anatofuz
parents:
diff changeset
22 // CHECK: ![[Tch]] = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)