Extend the verifier to validate range metadata on calls and invokes.
authorPhilip Reames <listmail@philipreames.com>
Mon, 20 Oct 2014 23:52:07 +0000 (23:52 +0000)
committerPhilip Reames <listmail@philipreames.com>
Mon, 20 Oct 2014 23:52:07 +0000 (23:52 +0000)
commitc0c4f1b78e6ab610c16fe728fa7a068bb39d9778
treea2f331f0dda3e7d8d75f96bd741b33ceb8cc7db4
parent32aaaeaa05b6fd74cb689e1ac0f53b0a903e7e17
Extend the verifier to validate range metadata on calls and invokes.

Range metadata applies to loads, call, and invokes.  We were validating that metadata applied to loads was correct according to the LangRef, but we were not validating metadata applied to calls or invokes.  This change extracts the checking functionality to a common location, reuses it for all valid locations, and adds a simple test to ensure a misused range on a call gets reported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220246 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Verifier.cpp
test/Verifier/range-1.ll