xref: /llvm-project/clang/test/CodeGen/bpf-debug-info-unref.c (revision ae0d2244a23567c8d9863e63b338d34c31416a7b)
1 // RUN: %clang -g -target bpf -S -emit-llvm %s -o - | FileCheck %s
2 //
3 // No debug info is produced for unreferenced functions.
4 // CHECK-NOT: !DISubprogram
5 void unref(void);
6 void unref2(typeof(unref));
7 
8 // No debug info for unused extern variables as well.
9 // CHECK-NOT: !DiGlobalVariable
10 extern int unused;
11 extern int unused2[sizeof(unused)];
12