diff options
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/DIBuilder.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/VMCore/DebugInfo.cpp | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/VMCore/DIBuilder.cpp b/llvm/lib/VMCore/DIBuilder.cpp index 2b77edc7f99..b3bbde86c54 100644 --- a/llvm/lib/VMCore/DIBuilder.cpp +++ b/llvm/lib/VMCore/DIBuilder.cpp @@ -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) }; diff --git a/llvm/lib/VMCore/DebugInfo.cpp b/llvm/lib/VMCore/DebugInfo.cpp index 73eb92ee846..0b43cc0beba 100644 --- a/llvm/lib/VMCore/DebugInfo.cpp +++ b/llvm/lib/VMCore/DebugInfo.cpp @@ -1049,7 +1049,11 @@ void DIDescriptor::print(raw_ostream &OS) const { } void DISubrange::printInternal(raw_ostream &OS) const { - OS << " [" << getLo() << ", " << getHi() << ']'; + int64_t Count = getCount(); + if (Count != -1) + OS << " [" << getLo() << ", " << Count - 1 << ']'; + else + OS << " [unbound]"; } void DIScope::printInternal(raw_ostream &OS) const { |

