Skip to content

Commit 45790d7

Browse files
committed
Mask the lowerBound assertion on DISubrange
This assertion used to allow `lowerBound: 0`, but D80197 changed it. In Rust, we always create `DISubrange` with that way, so we'll just comment out this assertion for now. See also: https://bugs.llvm.org/show_bug.cgi?id=47287
1 parent 0627e7d commit 45790d7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,8 +1592,9 @@ TypeIndex CodeViewDebug::lowerTypeArray(const DICompositeType *Ty) {
15921592
assert(Element->getTag() == dwarf::DW_TAG_subrange_type);
15931593

15941594
const DISubrange *Subrange = cast<DISubrange>(Element);
1595-
assert(!Subrange->getRawLowerBound() &&
1596-
"codeview doesn't support subranges with lower bounds");
1595+
// This ought to allow `lowerBound: 0`, https://bugs.llvm.org/show_bug.cgi?id=47287
1596+
// assert(!Subrange->getRawLowerBound() &&
1597+
// "codeview doesn't support subranges with lower bounds");
15971598
int64_t Count = -1;
15981599
if (auto *CI = Subrange->getCount().dyn_cast<ConstantInt*>())
15991600
Count = CI->getSExtValue();

0 commit comments

Comments
 (0)