forked from OSchip/llvm-project
[APInt] Implement operator! using operator==(uint64_t). NFCI
llvm-svn: 299293
This commit is contained in:
parent
9ab8d7f9c3
commit
473a80ffcb
|
@ -627,13 +627,7 @@ public:
|
||||||
///
|
///
|
||||||
/// \returns true if *this is zero, false otherwise.
|
/// \returns true if *this is zero, false otherwise.
|
||||||
bool operator!() const {
|
bool operator!() const {
|
||||||
if (isSingleWord())
|
return *this == 0;
|
||||||
return !VAL;
|
|
||||||
|
|
||||||
for (unsigned i = 0; i != getNumWords(); ++i)
|
|
||||||
if (pVal[i])
|
|
||||||
return false;
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
Loading…
Reference in New Issue