Index: llvm/lib/IR/DebugInfoMetadata.cpp =================================================================== --- llvm/lib/IR/DebugInfoMetadata.cpp +++ llvm/lib/IR/DebugInfoMetadata.cpp @@ -660,12 +660,7 @@ bool DISubprogram::describes(const Function *F) const { assert(F && "Invalid function"); - if (F->getSubprogram() == this) - return true; - StringRef Name = getLinkageName(); - if (Name.empty()) - Name = getName(); - return F->getName() == Name; + return (F->getSubprogram() == this); } DILexicalBlock *DILexicalBlock::getImpl(LLVMContext &Context, Metadata *Scope, Index: llvm/lib/IR/Verifier.cpp =================================================================== --- llvm/lib/IR/Verifier.cpp +++ llvm/lib/IR/Verifier.cpp @@ -2398,7 +2398,6 @@ AssertDI(SP->describes(&F), "!dbg attachment points at wrong subprogram for function", N, &F, &I, DL, Scope, SP); - visitMDNode(*SP); }; for (auto &BB : F) for (auto &I : BB) {