@@ -329,9 +329,6 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
329329 // / The current source language.
330330 dwarf::SourceLanguage CurrentSourceLang = dwarf::DW_LANG_lo_user;
331331
332- // / Whether source was present on the first DIFile encountered in each CU.
333- DenseMap<const DICompileUnit *, bool > HasSourceDebugInfo;
334-
335332 // / Stores the count of how many objects were passed to llvm.localescape for a
336333 // / given function and the largest index passed to llvm.localrecover.
337334 DenseMap<Function *, std::pair<unsigned , unsigned >> FrameEscapeInfo;
@@ -620,9 +617,6 @@ class Verifier : public InstVisitor<Verifier>, VerifierSupport {
620617 void verifyAttachedCallBundle (const CallBase &Call,
621618 const OperandBundleUse &BU);
622619
623- // / Verify all-or-nothing property of DIFile source attribute within a CU.
624- void verifySourceDebugInfo (const DICompileUnit &U, const DIFile &F);
625-
626620 // / Verify the llvm.experimental.noalias.scope.decl declarations
627621 void verifyNoAliasScopeDecl ();
628622};
@@ -1352,8 +1346,6 @@ void Verifier::visitDICompileUnit(const DICompileUnit &N) {
13521346
13531347 CurrentSourceLang = (dwarf::SourceLanguage)N.getSourceLanguage ();
13541348
1355- verifySourceDebugInfo (N, *N.getFile ());
1356-
13571349 CheckDI ((N.getEmissionKind () <= DICompileUnit::LastEmissionKind),
13581350 " invalid emission kind" , &N);
13591351
@@ -1442,8 +1434,6 @@ void Verifier::visitDISubprogram(const DISubprogram &N) {
14421434 " definition subprograms cannot be nested within DICompositeType "
14431435 " when enabling ODR" ,
14441436 &N);
1445- if (N.getFile ())
1446- verifySourceDebugInfo (*N.getUnit (), *N.getFile ());
14471437 } else {
14481438 // Subprogram declarations (part of the type hierarchy).
14491439 CheckDI (!Unit, " subprogram declarations must not have a compile unit" , &N);
@@ -6590,14 +6580,6 @@ void Verifier::verifyAttachedCallBundle(const CallBase &Call,
65906580 }
65916581}
65926582
6593- void Verifier::verifySourceDebugInfo (const DICompileUnit &U, const DIFile &F) {
6594- bool HasSource = F.getSource ().has_value ();
6595- if (!HasSourceDebugInfo.count (&U))
6596- HasSourceDebugInfo[&U] = HasSource;
6597- CheckDI (HasSource == HasSourceDebugInfo[&U],
6598- " inconsistent use of embedded source" );
6599- }
6600-
66016583void Verifier::verifyNoAliasScopeDecl () {
66026584 if (NoAliasScopeDecls.empty ())
66036585 return ;
0 commit comments