1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Fix -Werror when compiling rL318083

Statically assert the result and remove a runtime comparison, a direct consequence of the optimization introduced in rL318083.

llvm-svn: 318087
This commit is contained in:
Serge Guelton 2017-11-13 21:25:35 +00:00
parent 0158b7603e
commit f34cc96def

View File

@ -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