llvm-project/clang/test/CodeGen/debug-info-vla.c

15 lines
422 B
C
Raw Normal View History

// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
void testVLAwithSize(int s)
{
// CHECK: dbg.declare
// CHECK: dbg.declare({{.*}}, metadata ![[VAR:.*]], metadata ![[EXPR:.*]])
// CHECK: ![[EXPR]] = !DIExpression()
// CHECK: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+1]]
int vla[s];
int i;
for (i = 0; i < s; i++) {
vla[i] = i*i;
}
}