diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/APInt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/APInt.h b/include/llvm/ADT/APInt.h index fdb1fa47f5..d5d4d520cc 100644 --- a/include/llvm/ADT/APInt.h +++ b/include/llvm/ADT/APInt.h @@ -778,6 +778,12 @@ public: return !slt(RHS); } + /// This operation tests if there are any pairs of corresponding bits + /// between this APInt and RHS that are both set. + bool intersects(const APInt &RHS) const { + return (*this & RHS) != 0; + } + /// @} /// @name Resizing Operators /// @{ |