aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/debug-info-atomic.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/debug-info-atomic.c')
-rw-r--r--test/CodeGen/debug-info-atomic.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/debug-info-atomic.c b/test/CodeGen/debug-info-atomic.c
new file mode 100644
index 000000000000..3de0d3585d29
--- /dev/null
+++ b/test/CodeGen/debug-info-atomic.c
@@ -0,0 +1,8 @@
+// RUN: %clang -g -c -std=c11 -S -emit-llvm -o - %s | FileCheck %s
+
+// CHECK: !DIGlobalVariable(name: "i"
+// CHECK-SAME: type: ![[T:.*]], isLocal: false, isDefinition: true)
+// CHECK: ![[T]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[BT:.*]])
+// CHECK: ![[BT]] = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: ![[BTT:.*]])
+// CHECK: ![[BTT]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+_Atomic const int i;