Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-vla.cpp
blob73bdaf0abc53b9a85c0b6e02da827701ff7b169a
1 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -std=c++11 -triple x86_64-unknown-unknown %s -o - | FileCheck %s
4 void f(int m) {
5 int x[3][m];
8 int (*fp)(int[][*]) = nullptr;
10 // CHECK: !DICompositeType(tag: DW_TAG_array_type,
11 // CHECK-NOT: size:
12 // CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]]
13 // CHECK: [[ELEM_TYPE]] = !{[[NOCOUNT:.*]]}
14 // CHECK: [[NOCOUNT]] = !DISubrange(count: -1)
16 // CHECK: [[VAR:![0-9]+]] = !DILocalVariable(name: "__vla_expr0", {{.*}}flags: DIFlagArtificial
17 // CHECK: !DICompositeType(tag: DW_TAG_array_type,
18 // CHECK-NOT: size:
19 // CHECK-SAME: elements: [[ELEM_TYPE:![0-9]+]]
20 // CHECK: [[ELEM_TYPE]] = !{[[THREE:.*]], [[VARRANGE:![0-9]+]]}
21 // CHECK: [[THREE]] = !DISubrange(count: 3)
22 // CHECK: [[VARRANGE]] = !DISubrange(count: [[VAR]])