@@ -359,9 +359,6 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
359
359
// / Whether the current function has a DISubprogram attached to it.
360
360
bool HasDebugInfo = false ;
361
361
362
- // / The current source language.
363
- dwarf::SourceLanguage CurrentSourceLang = dwarf::DW_LANG_lo_user;
364
-
365
362
// / Stores the count of how many objects were passed to llvm.localescape for a
366
363
// / given function and the largest index passed to llvm.localrecover.
367
364
DenseMap<Function *, std::pair<unsigned , unsigned >> FrameEscapeInfo;
@@ -1156,10 +1153,6 @@ void Verifier::visitDIScope(const DIScope &N) {
1156
1153
1157
1154
void Verifier::visitDISubrange (const DISubrange &N) {
1158
1155
CheckDI (N.getTag () == dwarf::DW_TAG_subrange_type, " invalid tag" , &N);
1159
- bool HasAssumedSizedArraySupport = dwarf::isFortran (CurrentSourceLang);
1160
- CheckDI (HasAssumedSizedArraySupport || N.getRawCountNode () ||
1161
- N.getRawUpperBound (),
1162
- " Subrange must contain count or upperBound" , &N);
1163
1156
CheckDI (!N.getRawCountNode () || !N.getRawUpperBound (),
1164
1157
" Subrange can have any one of count or upperBound" , &N);
1165
1158
auto *CBound = N.getRawCountNode ();
@@ -1188,8 +1181,6 @@ void Verifier::visitDISubrange(const DISubrange &N) {
1188
1181
1189
1182
void Verifier::visitDIGenericSubrange (const DIGenericSubrange &N) {
1190
1183
CheckDI (N.getTag () == dwarf::DW_TAG_generic_subrange, " invalid tag" , &N);
1191
- CheckDI (N.getRawCountNode () || N.getRawUpperBound (),
1192
- " GenericSubrange must contain count or upperBound" , &N);
1193
1184
CheckDI (!N.getRawCountNode () || !N.getRawUpperBound (),
1194
1185
" GenericSubrange can have any one of count or upperBound" , &N);
1195
1186
auto *CBound = N.getRawCountNode ();
@@ -1413,8 +1404,6 @@ void Verifier::visitDICompileUnit(const DICompileUnit &N) {
1413
1404
CheckDI (!N.getFile ()->getFilename ().empty (), " invalid filename" , &N,
1414
1405
N.getFile ());
1415
1406
1416
- CurrentSourceLang = (dwarf::SourceLanguage)N.getSourceLanguage ();
1417
-
1418
1407
CheckDI ((N.getEmissionKind () <= DICompileUnit::LastEmissionKind),
1419
1408
" invalid emission kind" , &N);
1420
1409
@@ -1494,8 +1483,6 @@ void Verifier::visitDISubprogram(const DISubprogram &N) {
1494
1483
CheckDI (N.isDistinct (), " subprogram definitions must be distinct" , &N);
1495
1484
CheckDI (Unit, " subprogram definitions must have a compile unit" , &N);
1496
1485
CheckDI (isa<DICompileUnit>(Unit), " invalid unit type" , &N, Unit);
1497
- if (auto *CU = dyn_cast_or_null<DICompileUnit>(Unit))
1498
- CurrentSourceLang = (dwarf::SourceLanguage)CU->getSourceLanguage ();
1499
1486
// There's no good way to cross the CU boundary to insert a nested
1500
1487
// DISubprogram definition in one CU into a type defined in another CU.
1501
1488
auto *CT = dyn_cast_or_null<DICompositeType>(N.getRawScope ());
0 commit comments