diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-10-14 07:35:59 +0000 | 
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-10-14 07:35:59 +0000 | 
| commit | 722b26c0f2302bf64207e9f366b8af61e50bbdc9 (patch) | |
| tree | fedb0e631a962eea4a45d46d77426da2c834591f /llvm/lib/VMCore/Attributes.cpp | |
| parent | 5c407ed3abe87ed91d7c4a019df15c79084ac845 (diff) | |
| download | bcm5719-llvm-722b26c0f2302bf64207e9f366b8af61e50bbdc9.tar.gz bcm5719-llvm-722b26c0f2302bf64207e9f366b8af61e50bbdc9.zip | |
Remove the bitwise assignment OR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165895
Diffstat (limited to 'llvm/lib/VMCore/Attributes.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Attributes.cpp | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp index 0f24f97f836..635ad1409ff 100644 --- a/llvm/lib/VMCore/Attributes.cpp +++ b/llvm/lib/VMCore/Attributes.cpp @@ -96,10 +96,6 @@ bool Attributes::isEmptyOrSingleton() const {  Attributes Attributes::operator & (const Attributes &A) const {    return Attributes(Raw() & A.Raw());  } -Attributes &Attributes::operator |= (const Attributes &A) { -  Attrs.Bits |= A.Raw(); -  return *this; -}  Attributes &Attributes::operator &= (const Attributes &A) {    Attrs.Bits &= A.Raw();    return *this; @@ -504,7 +500,8 @@ Attributes &AttrListPtr::getAttributesAtIndex(unsigned i) const {    return AttrList->Attrs[i].Attrs;  } -AttrListPtr AttrListPtr::addAttr(unsigned Idx, Attributes Attrs) const { +AttrListPtr AttrListPtr::addAttr(LLVMContext &C, unsigned Idx, +                                 Attributes Attrs) const {    Attributes OldAttrs = getAttributes(Idx);  #ifndef NDEBUG    // FIXME it is not obvious how this should work for alignment. @@ -532,7 +529,9 @@ AttrListPtr AttrListPtr::addAttr(unsigned Idx, Attributes Attrs) const {      // If there are attributes already at this index, merge them in.      if (i != e && OldAttrList[i].Index == Idx) { -      Attrs |= OldAttrList[i].Attrs; +      Attrs = +        Attributes::get(C, Attributes::Builder(Attrs). +                        addAttributes(OldAttrList[i].Attrs));        ++i;      } | 

