mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -741,12 +741,10 @@ DIArray DIBuilder::getOrCreateArray(ArrayRef<Value *> Elements) {
|
||||
|
||||
/// getOrCreateSubrange - Create a descriptor for a value range. This
|
||||
/// implicitly uniques the values returned.
|
||||
DISubrange DIBuilder::getOrCreateSubrange(int64_t Lo, int64_t Hi,
|
||||
int64_t Count) {
|
||||
DISubrange DIBuilder::getOrCreateSubrange(int64_t Lo, int64_t Count) {
|
||||
Value *Elts[] = {
|
||||
GetTagConstant(VMContext, dwarf::DW_TAG_subrange_type),
|
||||
ConstantInt::get(Type::getInt64Ty(VMContext), Lo),
|
||||
ConstantInt::get(Type::getInt64Ty(VMContext), Hi),
|
||||
ConstantInt::get(Type::getInt64Ty(VMContext), Count)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user