diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-12-04 21:33:58 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-12-04 21:33:58 +0000 |
| commit | 751afdc3d1583dab43064892c90eb864cd69cd37 (patch) | |
| tree | e12ca5cc3c089e369e3d3cd34b74569536ab0858 /clang/test | |
| parent | 35439dff76c4c6ccbed39182ba818ecbca179dac (diff) | |
| download | bcm5719-llvm-751afdc3d1583dab43064892c90eb864cd69cd37.tar.gz bcm5719-llvm-751afdc3d1583dab43064892c90eb864cd69cd37.zip | |
Use the 'count' attribute to calculate the upper bound of an array.
The count attribute is more accurate with regards to the size of an array. It
also obviates the upper bound attribute in the subrange. We can also better
handle an unbound array by setting the count to -1 instead of the lower bound to
1 and upper bound to 0.
llvm-svn: 169311
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/debug-info-flex-member.cpp | 2 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-flex-member.cpp b/clang/test/CodeGenCXX/debug-info-flex-member.cpp index d38634cacf0..11329aa1e2b 100644 --- a/clang/test/CodeGenCXX/debug-info-flex-member.cpp +++ b/clang/test/CodeGenCXX/debug-info-flex-member.cpp @@ -1,6 +1,6 @@ // RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s -// CHECK: metadata !{i32 {{.*}}, i64 1, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] +// CHECK: metadata !{i32 {{.*}}, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] struct StructName { int member[]; diff --git a/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp b/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp index a7944c09c62..37e50cbe128 100644 --- a/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp +++ b/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp @@ -10,4 +10,4 @@ A a; // CHECK: [[ARRAY_TYPE]] = metadata !{i32 {{.*}}, null, metadata !"", null, i32 0, i64 0, i64 32, i32 0, i32 0, metadata [[BASE_TYPE:.*]], metadata [[ELEM_TYPE:.*]], i32 0, i32 0} ; [ DW_TAG_array_type ] // CHECK: [[BASE_TYPE]] = metadata !{i32 {{.*}}, null, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] // CHECK: [[ELEM_TYPE]] = metadata !{metadata [[SUBRANGE:.*]]} -// CHECK: [[SUBRANGE]] = metadata !{i32 786465, i64 1, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] [1, 0] +// CHECK: [[SUBRANGE]] = metadata !{i32 786465, i64 0, i64 -1} ; [ DW_TAG_subrange_type ] [unbound] |

