summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/debug-info-atomic.c
diff options
context:
space:
mode:
authorVictor Leschuk <vleschuk@accesssoftek.com>2016-10-31 19:09:47 +0000
committerVictor Leschuk <vleschuk@accesssoftek.com>2016-10-31 19:09:47 +0000
commit0df19037c4d1233680ffa7fc8e6c9bb4b6abdcc6 (patch)
tree7533be03ccfb0392f3e719f835d5d32a7d82be54 /clang/test/CodeGen/debug-info-atomic.c
parente1156c2eb05f12bb1dcbdd03532ed8098d415695 (diff)
downloadbcm5719-llvm-0df19037c4d1233680ffa7fc8e6c9bb4b6abdcc6.tar.gz
bcm5719-llvm-0df19037c4d1233680ffa7fc8e6c9bb4b6abdcc6.zip
DebugInfo: support for DW_TAG_atomic_type
Mark C11 _Atomic variables with DW_TAG_atomic_type tag. Differential Revision: https://reviews.llvm.org/D26145 llvm-svn: 285625
Diffstat (limited to 'clang/test/CodeGen/debug-info-atomic.c')
-rw-r--r--clang/test/CodeGen/debug-info-atomic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/CodeGen/debug-info-atomic.c b/clang/test/CodeGen/debug-info-atomic.c
new file mode 100644
index 00000000000..06b9546908c
--- /dev/null
+++ b/clang/test/CodeGen/debug-info-atomic.c
@@ -0,0 +1,7 @@
+// RUN: %clang -g -c -std=c11 -S -emit-llvm -o - %s | FileCheck %s
+
+// CHECK: !DIGlobalVariable(name: "i"{{.*}}type: !5, isLocal: false, isDefinition: true)
+// CHECK: !5 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !6)
+// CHECK: !6 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !7)
+// CHECK: !7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+_Atomic const int i;
OpenPOWER on IntegriCloud