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)
commitbf9676f7f073e40ea9956cbc99148067bcce96b2
treeb7d4665f1b6d2651c366e5d930afe2e7daae4c34
parent84801c217c69d31c24d0f1f5c7623fba5ce00536
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.

llvm-svn: 220246
llvm/lib/IR/Verifier.cpp
llvm/test/Verifier/range-1.ll