From fc25da101c40e2797aeb8f2e03fdc52ce71adb63 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 24 Mar 2015 17:32:19 +0000 Subject: Verifier: Start recursing into !dbg attachments The main verifier already recurses through the other entry points, so we might as well descend here too. This temporarily duplicates some work already done in `verifyDebugInfo()`, but eventually I'll be removing the other side. llvm-svn: 233095 --- llvm/lib/IR/Verifier.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index d5a5afa0c40..5f25891f2b1 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2567,11 +2567,9 @@ void Verifier::visitInstruction(Instruction &I) { &I); } - // Don't recurse into !dbg attachments (leave that for verifyDebugInfo()), - // but at least check that it's a legal type. if (MDNode *N = I.getDebugLoc().getAsMDNode()) { - Assert(isa(N), - "invalid !dbg metadata attachment", &I, N); + Assert(isa(N), "invalid !dbg metadata attachment", &I, N); + visitMDNode(*N); } InstsInThisBlock.insert(&I); -- cgit v1.2.3