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