Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / debug-info-extern-basic.c
blob13b88111f6a6df1592bd037daa242b20d0aeb6a9
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 return ch;
8 int test2(void) {
9 extern char ch2;
10 return ch2;
13 extern int (*foo)(int);
14 int test3(void) {
15 return foo(0);
18 // CHECK: distinct !DIGlobalVariable(name: "ch",{{.*}} type: ![[CHART:[0-9]+]], isLocal: false, isDefinition: false
19 // CHECK: distinct !DIGlobalVariable(name: "ch2",{{.*}} type: ![[CHART]], isLocal: false, isDefinition: false
20 // CHECK: ![[CHART]] = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
22 // CHECK: distinct !DIGlobalVariable(name: "foo",{{.*}} type: ![[FUNC:[0-9]+]], isLocal: false, isDefinition: false)
23 // CHECK: ![[FUNC]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[SUB:[0-9]+]], size: 64)
24 // CHECK: ![[SUB]] = !DISubroutineType(types: ![[TYPES:[0-9]+]])
25 // CHECK: ![[TYPES]] = !{![[BASET:[0-9]+]], ![[BASET]]}
26 // CHECK: ![[BASET]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)