summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/debug-info-zero-length-arrays.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
committerdim <dim@FreeBSD.org>2013-04-08 18:45:10 +0000
commitc72c57c9e9b69944e3e009cd5e209634839581d3 (patch)
tree4fc2f184c499d106f29a386c452b49e5197bf63d /test/CodeGenCXX/debug-info-zero-length-arrays.cpp
parent5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff)
downloadFreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip
FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/CodeGenCXX/debug-info-zero-length-arrays.cpp')
-rw-r--r--test/CodeGenCXX/debug-info-zero-length-arrays.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/debug-info-zero-length-arrays.cpp b/test/CodeGenCXX/debug-info-zero-length-arrays.cpp
new file mode 100644
index 0000000..fb47022
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-zero-length-arrays.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang -target x86_64-unknown-unknown -fverbose-asm -g -O0 -S -emit-llvm %s -o - | FileCheck %s
+// <rdar://problem/12566646>
+
+class A {
+ int x[];
+};
+A a;
+
+// CHECK: metadata [[ARRAY_TYPE:![0-9]*]]} ; [ DW_TAG_member ] [x]
+// CHECK: metadata [[ELEM_TYPE:![0-9]*]], i32 0, i32 0} ; [ DW_TAG_array_type ] [line 0, size 0, align 32, offset 0] [from int]
+// CHECK: [[ELEM_TYPE]] = metadata !{metadata [[SUBRANGE:.*]]}
+// CHECK: [[SUBRANGE]] = metadata !{i32 786465, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] [unbounded]
OpenPOWER on IntegriCloud