2015-10-08 12:24:12 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
|
2012-05-09 02:56:47 +08:00
|
|
|
|
|
|
|
void testVLAwithSize(int s)
|
|
|
|
{
|
2015-01-20 01:51:58 +08:00
|
|
|
// CHECK: dbg.declare
|
|
|
|
// CHECK: dbg.declare({{.*}}, metadata ![[VAR:.*]], metadata ![[EXPR:.*]])
|
2015-08-01 02:59:37 +08:00
|
|
|
// CHECK: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+2]]
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: ![[EXPR]] = !DIExpression(DW_OP_deref)
|
2012-05-09 02:56:47 +08:00
|
|
|
int vla[s];
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < s; i++) {
|
|
|
|
vla[i] = i*i;
|
|
|
|
}
|
|
|
|
}
|