Add an isUnitValue method for comparison against 1. This just follows a
authorReid Spencer <rspencer@reidspencer.com>
Thu, 1 Mar 2007 21:50:41 +0000 (21:50 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Thu, 1 Mar 2007 21:50:41 +0000 (21:50 +0000)
commit37eeaa729bc70258166a675ee00bbe95e608d519
tree8ac8010fd61c596b62e2f9adf22ddde53b51cb9f
parentc100b96b1536ef92cadac28bd268da105a67d4a0
Add an isUnitValue method for comparison against 1. This just follows a
common pattern with isNullValue, isAllOnesValue, etc. It also helps to
prevent things like getZExtValue() == 1, which could assert for large
bitwidths.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34813 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Constants.h