summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/debug-info-extern-duplicate.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/debug-info-extern-duplicate.c')
-rw-r--r--clang/test/CodeGen/debug-info-extern-duplicate.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-extern-duplicate.c b/clang/test/CodeGen/debug-info-extern-duplicate.c
new file mode 100644
index 00000000000..1c6d86f4cc0
--- /dev/null
+++ b/clang/test/CodeGen/debug-info-extern-duplicate.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -x c -debug-info-kind=limited -triple bpf-linux-gnu -emit-llvm %s -o - | FileCheck %s
+
+extern char ch;
+extern char ch;
+int test() {
+ return ch;
+}
+
+// CHECK: distinct !DIGlobalVariable(name: "ch",{{.*}} type: ![[T:[0-9]+]], isLocal: false, isDefinition: false
+// CHECK-NOT: distinct !DIGlobalVariable(name: "ch"
OpenPOWER on IntegriCloud