summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/APInt.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-02 05:41:00 +0000
committerChris Lattner <sabre@nondot.org>2007-04-02 05:41:00 +0000
commitfebabcc02a1303a8e4d9bed76718a32f0273607a (patch)
tree252e3d6aa190d0167d194650abde7f529090ea7d /include/llvm/ADT/APInt.h
parent5c6e2db0c4adf54299231cc6655b1d531e43983d (diff)
downloadllvm-febabcc02a1303a8e4d9bed76718a32f0273607a.tar.gz
llvm-febabcc02a1303a8e4d9bed76718a32f0273607a.tar.bz2
llvm-febabcc02a1303a8e4d9bed76718a32f0273607a.tar.xz
add a helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35585 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APInt.h')
-rw-r--r--include/llvm/ADT/APInt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h
index c1557ec753..b8b1687def 100644
--- a/include/llvm/ADT/APInt.h
+++ b/include/llvm/ADT/APInt.h
@@ -272,6 +272,9 @@ public:
/// @returns true if the argument APInt value is a power of two > 0.
bool isPowerOf2() const;
+ /// isSignBit - Return true if this is the value returned by getSignBit.
+ bool isSignBit() const { return isMinSignedValue(); }
+
/// This converts the APInt to a boolean value as a test against zero.
/// @brief Boolean conversion function.
inline bool getBoolValue() const {