summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/vla-consruct.cpp
diff options
context:
space:
mode:
authorSander de Smalen <sander.desmalen@arm.com>2018-02-01 11:25:10 +0000
committerSander de Smalen <sander.desmalen@arm.com>2018-02-01 11:25:10 +0000
commit835a31e2eff12ee909b131e07a44e0b8558d801a (patch)
tree18a55f5730e88e4adfb5b873a4d16cf7e41dd382 /test/CodeGenCXX/vla-consruct.cpp
parent2cbd32574f151cbd67c1644b67f1cf7eea3fc18d (diff)
[DebugInfo] Enable debug information for C99 VLA types
Summary: This patch enables debugging of C99 VLA types by generating more precise LLVM Debug metadata, using the extended DISubrange 'count' field that takes a DIVariable. This should implement: Bug 30553: Debug info generated for arrays is not what GDB expects (not as good as GCC's) https://bugs.llvm.org/show_bug.cgi?id=30553 Reviewers: echristo, aprantl, dexonsmith, clayborg, pcc, kristof.beyls, dblaikie Reviewed By: aprantl Subscribers: jholewinski, schweitz, davide, fhahn, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D41698 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/vla-consruct.cpp')
-rw-r--r--test/CodeGenCXX/vla-consruct.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/CodeGenCXX/vla-consruct.cpp b/test/CodeGenCXX/vla-consruct.cpp
index fd8314a5d7..87191fe99d 100644
--- a/test/CodeGenCXX/vla-consruct.cpp
+++ b/test/CodeGenCXX/vla-consruct.cpp
@@ -21,6 +21,8 @@ void test(int n) {
// CHECK: define void {{.*test.*}}(i32 [[n:%.+]]) #
// CHECK: [[n_addr:%.+]] = alloca
// CHECK-NEXT: [[saved_stack:%.+]] = alloca
+ // CHECK-NEXT: [[vla_expr:%.+]] = alloca i64, align 8
+ // CHECK-NEXT: [[vla_expr1:%.+]] = alloca i64, align 8
// CHECK-NEXT: [[sizeof_S:%.+]] = alloca
// CHECK-NEXT: [[sizeof_array_t_0_0:%.+]] = alloca
// CHECK-NEXT: [[sizeof_array_t_0:%.+]] = alloca
@@ -37,6 +39,8 @@ void test(int n) {
// CHECK-NEXT: store i8* [[t4]], i8** [[saved_stack]]
// CHECK-NEXT: [[t5:%.+]] = mul nuw i64 [[t1]], [[t3]]
// CHECK-NEXT: [[vla:%.+]] = alloca [[struct_S]], i64 [[t5]]
+ // CHECK-NEXT: store i64 [[t1]], i64* [[vla_expr]]
+ // CHECK-NEXT: store i64 [[t3]], i64* [[vla_expr1]]
// CHECK-NEXT: [[t6:%.+]] = mul nuw i64 [[t1]], [[t3]]
// CHECK-NEXT: [[isempty:%.+]] = icmp eq i64 [[t6]], 0
// CHECK-NEXT: br i1 [[isempty]], label %[[arrayctor_cont:.+]], label %[[new_ctorloop:.+]]