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)
|
|
|
|
{
|
2018-11-10 03:17:56 +08:00
|
|
|
// CHECK-DAG: dbg.declare({{.*}} %__vla_expr0, metadata ![[VLAEXPR:[0-9]+]]
|
2018-02-03 21:55:59 +08:00
|
|
|
// CHECK-DAG: dbg.declare({{.*}} %vla, metadata ![[VAR:[0-9]+]]
|
2018-11-10 03:17:56 +08:00
|
|
|
// CHECK-DAG: ![[VLAEXPR]] = !DILocalVariable(name: "__vla_expr0", {{.*}} flags: DIFlagArtificial
|
2018-02-03 21:55:59 +08:00
|
|
|
// CHECK-DAG: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+2]]
|
|
|
|
// CHECK-DAG: !DISubrange(count: ![[VLAEXPR]])
|
2012-05-09 02:56:47 +08:00
|
|
|
int vla[s];
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < s; i++) {
|
|
|
|
vla[i] = i*i;
|
|
|
|
}
|
|
|
|
}
|