diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-24 17:32:19 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-24 17:32:19 +0000 |
commit | fc25da101c40e2797aeb8f2e03fdc52ce71adb63 (patch) | |
tree | 5e88df63381a7e92babec1a8653d245658a5468f /llvm/lib/IR/Verifier.cpp | |
parent | f238c78c4c043d1c289f7bb91c8b0d8c71f1c7c0 (diff) | |
download | bcm5719-llvm-fc25da101c40e2797aeb8f2e03fdc52ce71adb63.tar.gz bcm5719-llvm-fc25da101c40e2797aeb8f2e03fdc52ce71adb63.zip |
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
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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<MDLocation>(N), - "invalid !dbg metadata attachment", &I, N); + Assert(isa<MDLocation>(N), "invalid !dbg metadata attachment", &I, N); + visitMDNode(*N); } InstsInThisBlock.insert(&I); |