diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-08-15 20:02:54 +0000 |
| commit | 56d91b49b13fe55c918afbda19f6165b5fbff87a (patch) | |
| tree | 9abb1a658a297776086f4e0dfa6ca533de02104e /test/CodeGen/debug-info-vla.c | |
| parent | 41e20f564abdb05101d6b2b29c59459a966c22cc (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/debug-info-vla.c')
| -rw-r--r-- | test/CodeGen/debug-info-vla.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/debug-info-vla.c b/test/CodeGen/debug-info-vla.c new file mode 100644 index 000000000000..20fb6aace41f --- /dev/null +++ b/test/CodeGen/debug-info-vla.c @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s + +// CHECK: metadata !{i32 {{.*}}, metadata {{.*}}, metadata !"vla", metadata {{.*}}, i32 7, metadata {{.*}}, i32 0, i32 0, i64 2} ; [ DW_TAG_auto_variable ] + +void testVLAwithSize(int s) +{ + int vla[s]; + int i; + for (i = 0; i < s; i++) { + vla[i] = i*i; + } +} |
