Verifier: Function metadata attachments require a body
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 24 Apr 2015 21:53:27 +0000 (21:53 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 24 Apr 2015 21:53:27 +0000 (21:53 +0000)
commitef477f3580c1db48ccdc21915d4f5d99ff61a983
tree0a23877b6fce2829e8948272a7f91c70166fdc69
parenteb79bb6e61583c3ba05c8478809c02e3cc7bb6d3
Verifier: Function metadata attachments require a body

Add a verifier check that only functions with bodies have metadata
attachments.  This should help catch bugs in frontends and
transformation passes.  Part of PR23340.

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