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
diff --git a/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp b/clang/test/CodeGenCXX/debug-info-zero-length-arrays.cpp
index a7944c0..37e50cb 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 @@
 // 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]