summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/APInt.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-11-03 00:38:40 +0000
committerDan Gohman <gohman@apple.com>2010-11-03 00:38:40 +0000
commit5005e27f9714f0eaa5b8b7a5a1f6751afa163f07 (patch)
tree6276391e2456e32c527f50d8d98b7c611d52c859 /include/llvm/ADT/APInt.h
parent9372fd3c92777a137f0a1a34375c1863afe64c9c (diff)
downloadllvm-5005e27f9714f0eaa5b8b7a5a1f6751afa163f07.tar.gz
llvm-5005e27f9714f0eaa5b8b7a5a1f6751afa163f07.tar.bz2
llvm-5005e27f9714f0eaa5b8b7a5a1f6751afa163f07.tar.xz
Factor code out of APInt to form a isUIntN helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APInt.h')
-rw-r--r--include/llvm/ADT/APInt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h
index e03f63bebf..d398f8e3f6 100644
--- a/include/llvm/ADT/APInt.h
+++ b/include/llvm/ADT/APInt.h
@@ -348,7 +348,7 @@ public:
return true;
if (isSingleWord())
- return VAL == (VAL & (~0ULL >> (64 - N)));
+ return isUIntN(N, VAL);
APInt Tmp(N, getNumWords(), pVal);
Tmp.zext(getBitWidth());
return Tmp == (*this);