Verifier: Move checks over from DIDescriptor::Verify()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 31 Mar 2015 00:47:15 +0000 (00:47 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 31 Mar 2015 00:47:15 +0000 (00:47 +0000)
commit2f5cbb59470f4f3b6144261bb36a8a806d799275
treea858b6dbaef714220b5f9f7b69e84095b892595d
parent9e5f04d2191489f858d27ac6641247d40bef8c89
Verifier: Move checks over from DIDescriptor::Verify()

Move over some more checks from `DIDescriptor::Verify()`, and change
`LLParser` to require non-null `file:` fields in compile units.

I've ignored the comment in test/Assembler/metadata-null-operands.ll
since I disagree with it.  At the time that test was written (r229960),
the debug info verifier wasn't on by default, so my comment there is in
the context of not expecting the verifier to be useful.  It is now, and
besides that, since r233394 we can check when parsing textual IR whether
an operand is null that shouldn't be.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233654 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AsmParser/LLParser.cpp
lib/IR/DebugInfo.cpp
lib/IR/Verifier.cpp
test/Assembler/invalid-mdcompileunit-null-file.ll [new file with mode: 0644]
test/Assembler/metadata-null-operands.ll