diff options
Diffstat (limited to 'clang/test/CodeGen/debug-info-extern-unused.c')
-rw-r--r-- | clang/test/CodeGen/debug-info-extern-unused.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-extern-unused.c b/clang/test/CodeGen/debug-info-extern-unused.c new file mode 100644 index 00000000000..8b89eaab27e --- /dev/null +++ b/clang/test/CodeGen/debug-info-extern-unused.c @@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s + +extern char ch; +int test() { + return 0; +} + +int test2() { + extern char ch2; + return 0; +} + +extern int (*foo)(int); +int test3() { + return 0; +} + +int test4() { + extern int (*foo2)(int); + return 0; +} + +// CHECK-NOT: distinct !DIGlobalVariable(name: "ch" +// CHECK-NOT: distinct !DIGlobalVariable(name: "ch2" +// CHECK-NOT: distinct !DIGlobalVariable(name: "foo" +// CHECK-NOT: distinct !DIGlobalVariable(name: "foo2" |