LLParser: Require non-null scope for MDLocation and MDLocalVariable
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 27 Mar 2015 17:56:39 +0000 (17:56 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 27 Mar 2015 17:56:39 +0000 (17:56 +0000)
commit2cee1c9d3c261e44e9d2eb1f1d0d16c17e4315df
tree127b632de3ad9b2dadaffdf24f8fa9f77db44630
parent2a9bbcbbadd5ba2eac950e1717c456298ec12bb6
LLParser: Require non-null scope for MDLocation and MDLocalVariable

Change `LLParser` to require a non-null `scope:` field for both
`MDLocation` and `MDLocalVariable`.  There's no need to wait for the
verifier for this check.  This also allows their `::getImpl()` methods
to assert that the incoming scope is non-null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233394 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AsmParser/LLParser.cpp
lib/IR/DebugInfoMetadata.cpp
test/Assembler/invalid-mdlocalvariable-null-scope.ll [new file with mode: 0644]
test/Assembler/invalid-mdlocation-null-scope.ll [new file with mode: 0644]
test/CodeGen/Generic/dbg_value.ll
test/CodeGen/X86/dbg-changes-codegen.ll