diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-09-20 15:20:36 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-09-20 15:20:36 +0000 |
| commit | b4e211cd19201d2b344f40123411e2529806f6c0 (patch) | |
| tree | d10eaa961d574429d0519980b250fef7f9ee749b /llvm/lib | |
| parent | 264f5040775eaa225849a92c08eda4d1e1359625 (diff) | |
| download | bcm5719-llvm-b4e211cd19201d2b344f40123411e2529806f6c0.tar.gz bcm5719-llvm-b4e211cd19201d2b344f40123411e2529806f6c0.zip | |
Remove more bare uses of the different Attribute enums.
llvm-svn: 164307
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/Attributes.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp index 6047d4b9f00..3a87da44dd1 100644 --- a/llvm/lib/VMCore/Attributes.cpp +++ b/llvm/lib/VMCore/Attributes.cpp @@ -78,12 +78,12 @@ std::string Attributes::getAsString() const { Result += "nonlazybind "; if (hasAddressSafetyAttr()) Result += "address_safety "; - if (*this & Attribute::StackAlignment) { // FIXME + if (hasStackAlignmentAttr()) { Result += "alignstack("; Result += utostr(Attribute::getStackAlignmentFromAttrs(*this)); Result += ") "; } - if (*this & Attribute::Alignment) { // FIXME + if (hasAlignmentAttr()) { Result += "align "; Result += utostr(Attribute::getAlignmentFromAttrs(*this)); Result += " "; @@ -263,7 +263,7 @@ bool AttrListPtr::hasAttrSomewhere(Attributes Attr) const { const SmallVector<AttributeWithIndex, 4> &Attrs = AttrList->Attrs; for (unsigned i = 0, e = Attrs.size(); i != e; ++i) - if (Attrs[i].Attrs & Attr) + if (Attrs[i].Attrs.hasAttributes(Attr)) return true; return false; } @@ -274,8 +274,8 @@ AttrListPtr AttrListPtr::addAttr(unsigned Idx, Attributes Attrs) const { #ifndef NDEBUG // FIXME it is not obvious how this should work for alignment. // For now, say we can't change a known alignment. - Attributes OldAlign = OldAttrs & Attribute::Alignment; - Attributes NewAlign = Attrs & Attribute::Alignment; + unsigned OldAlign = Attribute::getAlignmentFromAttrs(OldAttrs); + unsigned NewAlign = Attribute::getAlignmentFromAttrs(Attrs); assert((!OldAlign || !NewAlign || OldAlign == NewAlign) && "Attempt to change alignment!"); #endif @@ -314,7 +314,7 @@ AttrListPtr AttrListPtr::removeAttr(unsigned Idx, Attributes Attrs) const { #ifndef NDEBUG // FIXME it is not obvious how this should work for alignment. // For now, say we can't pass in alignment, which no current use does. - assert(!(Attrs & Attribute::Alignment) && "Attempt to exclude alignment!"); + assert(!Attrs.hasAlignmentAttr() && "Attempt to exclude alignment!"); #endif if (AttrList == 0) return AttrListPtr(); |

