LLVM has changed the semantics of dbg.declare for describing function arguments. After this patch a dbg.declare always takes the *address* of a variable as the first argument, even if the argument is not an alloca. https://bugs.llvm.org/show_bug.cgi?id=32382 rdar://problem/31205000 llvm-svn: 300523
15 lines
422 B
C
15 lines
422 B
C
// 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;
|
|
}
|
|
}
|