AsmWriter: Assert on unresolved metadata nodes
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 17 Mar 2015 00:16:35 +0000 (00:16 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 17 Mar 2015 00:16:35 +0000 (00:16 +0000)
commitb47d91882510d37434a6426147eb89576647f109
treeb09fb02f5e48eed3ecc4818049c96f0f9eb85566
parent6837ab53fb0d06460979e4e4a662b116fcbcca5b
AsmWriter: Assert on unresolved metadata nodes

Assert that `MDNode::isResolved()`.  While in theory the `Verifier`
should catch this, it doesn't descend into all debug info, and the
`DebugInfoVerifier` doesn't call into the `Verifier`.  Besides, this
helps to catch bugs when `-disable-verify=true`.

Note that I haven't come across a place where this fails with clang
today, so no testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232442 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/BitcodeWriter.cpp