Skip to content

Commit 4e724c2

Browse files
committed
Revert "[DWARFv5] Verify all-or-nothing constraint on DIFile source"
This reverts commit 4ed5195.
1 parent 2ee8763 commit 4e724c2

File tree

3 files changed

+0
-86
lines changed

3 files changed

+0
-86
lines changed

llvm/lib/IR/Verifier.cpp

-18
Original file line numberDiff line numberDiff line change
@@ -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-
66016583
void Verifier::verifyNoAliasScopeDecl() {
66026584
if (NoAliasScopeDecls.empty())
66036585
return;

llvm/test/Assembler/debug-info-source-invalid.ll

-27
This file was deleted.

llvm/test/Assembler/debug-info-source.ll

-41
This file was deleted.

0 commit comments

Comments
 (0)