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

Dan Gohman gohman at apple.com
Wed Feb 20 11:17:36 PST 2008


Omitting the inline keyword seemed more consistent with other code
in APInt. But it appears APInt does use they keyword in a few places.
It's a function definition inside a class, so it doesn't really matter.

Dan

On Feb 20, 2008, at 9:38 AM, Evan Cheng wrote:

> 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
>
> _______________________________________________
> 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