Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / debug-info-vla.c
blobe9494111d207f623903f50a06513546b53dd2f27
1 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
3 void testVLAwithSize(int s)
5 // CHECK-DAG: #dbg_declare({{.*}} %__vla_expr0, ![[VLAEXPR:[0-9]+]]
6 // CHECK-DAG: #dbg_declare({{.*}} %vla, ![[VAR:[0-9]+]]
7 // CHECK-DAG: ![[VLAEXPR]] = !DILocalVariable(name: "__vla_expr0", {{.*}} flags: DIFlagArtificial
8 // CHECK-DAG: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+2]]
9 // CHECK-DAG: !DISubrange(count: ![[VLAEXPR]])
10 int vla[s];
11 int i;
12 for (i = 0; i < s; i++) {
13 vla[i] = i*i;