[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / debug-info-extern-callback.c
bloba9f210ccf7d7cf5e7cd217842076dc3c3ff0e809
1 // RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
3 extern int do_work1(int);
4 long bpf_helper1(void *callback_fn);
5 long prog1(void) {
6 return bpf_helper1(&do_work1);
9 extern int do_work2(void);
10 long prog2_1(void) {
11 return (long)&do_work2;
13 int do_work2(void) { return 0; }
14 long prog2_2(void) {
15 return (long)&do_work2;
18 // CHECK: declare !dbg ![[FUNC1:[0-9]+]] i32 @do_work1
19 // CHECK: define dso_local i32 @do_work2() #{{[0-9]+}} !dbg ![[FUNC2:[0-9]+]]
21 // CHECK: ![[FUNC1]] = !DISubprogram(name: "do_work1"
22 // CHECK: ![[FUNC2]] = distinct !DISubprogram(name: "do_work2"