[llvm-commits] [llvm] r47379 - /llvm/trunk/include/llvm/ADT/APInt.h

Evan Cheng evan.cheng at apple.com
Wed Feb 20 09:38:12 PST 2008


Mark it "inline" to be consistent with other one-line functions?

Evan

On Feb 20, 2008, at 8:08 AM, Dan Gohman wrote:

> Author: djg
> Date: Wed Feb 20 10:08:11 2008
> New Revision: 47379
>
> URL: http://llvm.org/viewvc/llvm-project?rev=47379&view=rev
> Log:
> Add an intersects method to APInt, to capture a common idiom.
>
> Modified:
>    llvm/trunk/include/llvm/ADT/APInt.h
>
> Modified: llvm/trunk/include/llvm/ADT/APInt.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=47379&r1=47378&r2=47379&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm/trunk/include/llvm/ADT/APInt.h (original)
> +++ llvm/trunk/include/llvm/ADT/APInt.h Wed Feb 20 10:08:11 2008
> @@ -778,6 +778,12 @@
>     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
>   /// @{
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list