mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Move more methods out-of-line. This is in preparation for changing the internal
contents of the Attributes class over to an AttributesImpl. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,6 +28,9 @@ using namespace llvm;
|
||||
// Attribute Function Definitions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
bool Attributes::hasAttributes(const Attributes &A) const {
|
||||
return Bits & A.Bits;
|
||||
}
|
||||
bool Attributes::hasAddressSafetyAttr() const {
|
||||
return Bits & Attribute::AddressSafety_i;
|
||||
}
|
||||
@@ -125,6 +128,31 @@ unsigned Attributes::getStackAlignment() const {
|
||||
return 1U << (((Bits & Attribute::StackAlignment_i) >> 26) - 1);
|
||||
}
|
||||
|
||||
bool Attributes::isEmptyOrSingleton() const {
|
||||
return (Bits & (Bits - 1)) == 0;
|
||||
}
|
||||
|
||||
Attributes Attributes::operator | (const Attributes &Attrs) const {
|
||||
return Attributes(Bits | Attrs.Bits);
|
||||
}
|
||||
Attributes Attributes::operator & (const Attributes &Attrs) const {
|
||||
return Attributes(Bits & Attrs.Bits);
|
||||
}
|
||||
Attributes Attributes::operator ^ (const Attributes &Attrs) const {
|
||||
return Attributes(Bits ^ Attrs.Bits);
|
||||
}
|
||||
Attributes &Attributes::operator |= (const Attributes &Attrs) {
|
||||
Bits |= Attrs.Bits;
|
||||
return *this;
|
||||
}
|
||||
Attributes &Attributes::operator &= (const Attributes &Attrs) {
|
||||
Bits &= Attrs.Bits;
|
||||
return *this;
|
||||
}
|
||||
Attributes Attributes::operator ~ () const {
|
||||
return Attributes(~Bits);
|
||||
}
|
||||
|
||||
Attributes Attributes::typeIncompatible(Type *Ty) {
|
||||
Attributes::Builder Incompatible;
|
||||
|
||||
|
Reference in New Issue
Block a user