Verifier: Check that !dbg attachments have the right type
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Mar 2015 19:26:58 +0000 (19:26 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 20 Mar 2015 19:26:58 +0000 (19:26 +0000)
commitd94d5bbbf91589aafbf9c902f3839d3a51db6484
tree0a99a6f186fdd97045b13c2a737d3e34b66d879e
parentc867853c90e82250e3dbf35d9ce8a1ab4c331ab4
Verifier: Check that !dbg attachments have the right type

A WIP patch makes `DIDescriptor` accessors more strict, which in turn
causes the `DebugInfoFinder` to crash on wrongly typed `!dbg`
attachments.  Catch that error up front in
`Verifier::visitInstruction()`.

Also remove a test that we "handle" invalid `!dbg` attachments, added
back in r99938.  We don't want to handle those anymore.

Note: I'm *not* recursing and verifying the debug info graph reachable
from this node; that work is already done by `verifyDebugInfo()`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232834 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Verifier.cpp
test/DebugInfo/2010-03-30-InvalidDbgInfoCrash.ll [deleted file]
test/DebugInfo/location-verifier.ll
test/Verifier/dbg.ll [new file with mode: 0644]