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
|
2017-08-24 04:31:27 +08:00
|
|
|
// CHECK: dbg.declare({{.*}}, metadata ![[VAR:.*]], metadata !DIExpression())
|
2017-04-18 09:22:01 +08:00
|
|
|
// CHECK: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+1]]
|
2012-05-09 02:56:47 +08:00
|
|
|
int vla[s];
|
|
|
|
int i;
|
|
|
|
for (i = 0; i < s; i++) {
|
|
|
|
vla[i] = i*i;
|
|
|
|
}
|
|
|
|
}
|