[llvm-commits] [llvm] r171220 - /llvm/trunk/lib/VMCore/Attributes.cpp
Bill Wendling
isanbard at gmail.com
Sat Dec 29 16:05:01 PST 2012
Will do. That was a legacy name. :-) actually, I'm hoping to get rid of it altogether.
-bw
On Dec 29, 2012, at 7:11 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Dec 29, 2012, at 4:10 AM, Bill Wendling <isanbard at gmail.com> wrote:
>
>> Author: void
>> Date: Sat Dec 29 06:10:46 2012
>> New Revision: 171220
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=171220&view=rev
>> Log:
>> Use the accessor method instead of the raw ivar to get the bits.
>
> Please pick a better name than "Raw()" which doesn't follow the naming convention and doesn't convey anything useful.
>
> -Chris
>
>>
>> Modified:
>> llvm/trunk/lib/VMCore/Attributes.cpp
>>
>> Modified: llvm/trunk/lib/VMCore/Attributes.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=171220&r1=171219&r2=171220&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/VMCore/Attributes.cpp (original)
>> +++ llvm/trunk/lib/VMCore/Attributes.cpp Sat Dec 29 06:10:46 2012
>> @@ -335,23 +335,23 @@
>> }
>>
>> bool AttributeImpl::hasAttribute(uint64_t A) const {
>> - return (Bits & getAttrMask(A)) != 0;
>> + return (Raw() & getAttrMask(A)) != 0;
>> }
>>
>> bool AttributeImpl::hasAttributes() const {
>> - return Bits != 0;
>> + return Raw() != 0;
>> }
>>
>> bool AttributeImpl::hasAttributes(const Attribute &A) const {
>> - return Bits & A.Raw(); // FIXME: Raw() won't work here in the future.
>> + return Raw() & A.Raw(); // FIXME: Raw() won't work here in the future.
>> }
>>
>> uint64_t AttributeImpl::getAlignment() const {
>> - return Bits & getAttrMask(Attribute::Alignment);
>> + return Raw() & getAttrMask(Attribute::Alignment);
>> }
>>
>> uint64_t AttributeImpl::getStackAlignment() const {
>> - return Bits & getAttrMask(Attribute::StackAlignment);
>> + return Raw() & getAttrMask(Attribute::StackAlignment);
>> }
>>
>> //===----------------------------------------------------------------------===//
>>
>>
>> _______________________________________________
>> 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