diff options
Diffstat (limited to 'include/llvm/IR/Constant.h')
| -rw-r--r-- | include/llvm/IR/Constant.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/IR/Constant.h b/include/llvm/IR/Constant.h index 9daeac6ad6e7..0c94b58a3112 100644 --- a/include/llvm/IR/Constant.h +++ b/include/llvm/IR/Constant.h @@ -117,8 +117,8 @@ public: //// Methods for support type inquiry through isa, cast, and dyn_cast: static bool classof(const Value *V) { - return V->getValueID() >= ConstantFirstVal && - V->getValueID() <= ConstantLastVal; + static_assert(ConstantFirstVal == 0, "V->getValueID() >= ConstantFirstVal always succeeds"); + return V->getValueID() <= ConstantLastVal; } /// This method is a special form of User::replaceUsesOfWith |
