diff options
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index cb9b641a73f..8f055886efe 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -1011,22 +1011,6 @@ void Verifier::visitDISubprogram(const DISubprogram &N) { if (N.isDefinition()) Assert(N.isDistinct(), "subprogram definitions must be distinct", &N); - - // Ensure that every DISubprogram with isDefinition: true belongs - // to a DICompileUnit. - // FIXME: This is a very inefficient way of handling the problem. - // Use a SmallSetPtr which contains the Listed DISubprograms in the CU - // instead. - if (N.isDefinition()) { - auto *CUs = M->getNamedMetadata("llvm.dbg.cu"); - Assert(CUs, "subprogram must belong to a compile unit", &N); - for (auto *CU : CUs->operands()) - if (auto Subprograms = cast<DICompileUnit>(CU)->getSubprograms()) - for (const auto *Sp : Subprograms) - if (Sp == &N) - return; - Assert(false, "subprogram not found in any compile unit", &N); - } } void Verifier::visitDILexicalBlockBase(const DILexicalBlockBase &N) { |