Verifier: Move over DISubprogram::Verify()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 31 Mar 2015 02:09:55 +0000 (02:09 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 31 Mar 2015 02:09:55 +0000 (02:09 +0000)
commitd3cfcf96146323bd0dbc63e011f46522c36235d5
tree21d9f393c01c01027782a7aab1894f3be385942a
parent81a8d62b948d81b623fa32348e90e2f16229ac59
Verifier: Move over DISubprogram::Verify()

Move over the remaining (somewhat complicated) check from
`DISubprogram::Verify()`.  I suspect this check could be optimized --
e.g., it would be nice not to do another full traversal here -- but it's
not exactly obvious how.  For now, just bring it over as is.

Once we have a better model for the "canonical" subprogram of a
`Function`, we should enforce that all `!dbg` attachments lead to the
canonical one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233663 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/DebugInfo.cpp
lib/IR/Verifier.cpp
unittests/IR/IRBuilderTest.cpp