APInt: Simplify code.
No functionality change. llvm-svn: 160929
This commit is contained in:
parent
e0d6e8427a
commit
ef2932125d
|
|
@ -357,13 +357,7 @@ public:
|
||||||
/// @brief Check if this APInt has an N-bits unsigned integer value.
|
/// @brief Check if this APInt has an N-bits unsigned integer value.
|
||||||
bool isIntN(unsigned N) const {
|
bool isIntN(unsigned N) const {
|
||||||
assert(N && "N == 0 ???");
|
assert(N && "N == 0 ???");
|
||||||
if (N >= getBitWidth())
|
return getActiveBits() <= N;
|
||||||
return true;
|
|
||||||
|
|
||||||
if (isSingleWord())
|
|
||||||
return isUIntN(N, VAL);
|
|
||||||
return APInt(N, makeArrayRef(pVal, getNumWords())).zext(getBitWidth())
|
|
||||||
== (*this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief Check if this APInt has an N-bits signed integer value.
|
/// @brief Check if this APInt has an N-bits signed integer value.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue