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)
commita3bdc328a5ef1c915e897221aa29d17b0b7cb4d5
tree2581e76ab5a372af5197d3b421f44562c5eeca7c
parentd4e07c973c6e02713ab330d6a8a4dd09520d76bd
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()`.

llvm-svn: 232834
llvm/lib/IR/Verifier.cpp
llvm/test/DebugInfo/2010-03-30-InvalidDbgInfoCrash.ll [deleted file]
llvm/test/DebugInfo/location-verifier.ll
llvm/test/Verifier/dbg.ll [new file with mode: 0644]