brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1009 B · 13b8811 Raw
27 lines · c
1// RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s2 3extern char ch;4int test(void) {5  return ch;6}7 8int test2(void) {9  extern char ch2;10  return ch2;11}12 13extern int (*foo)(int);14int test3(void) {15  return foo(0);16}17 18// CHECK: distinct !DIGlobalVariable(name: "ch",{{.*}} type: ![[CHART:[0-9]+]], isLocal: false, isDefinition: false19// CHECK: distinct !DIGlobalVariable(name: "ch2",{{.*}} type: ![[CHART]], isLocal: false, isDefinition: false20// CHECK: ![[CHART]] = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)21 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)27