diff options
| author | Sander de Smalen <sander.desmalen@arm.com> | 2018-02-01 11:25:10 +0000 |
|---|---|---|
| committer | Sander de Smalen <sander.desmalen@arm.com> | 2018-02-01 11:25:10 +0000 |
| commit | 17c4633e7faf76682e7c999576128848b10fb815 (patch) | |
| tree | cef6c0668b787ede92f8ebf7e6d0c590136ae5c7 /clang/test/CodeGenCXX/vla-consruct.cpp | |
| parent | e11f0545db7a0a6939befb31f5f2c43a8ba4874e (diff) | |
| download | bcm5719-llvm-17c4633e7faf76682e7c999576128848b10fb815.tar.gz bcm5719-llvm-17c4633e7faf76682e7c999576128848b10fb815.zip | |
[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
llvm-svn: 323952
Diffstat (limited to 'clang/test/CodeGenCXX/vla-consruct.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/vla-consruct.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/vla-consruct.cpp b/clang/test/CodeGenCXX/vla-consruct.cpp index fd8314a5d71..87191fe99da 100644 --- a/clang/test/CodeGenCXX/vla-consruct.cpp +++ b/clang/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:.+]] |

