clang/test/DebugInfo/Generic/bpf-debug-info-unref.c
raw| 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)]; |