mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-10 02:25:47 +00:00
Push down the conversion of the alignment from the bit mask to a real number into the attribute implementation class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -73,7 +73,7 @@ bool Attribute::hasAttributes() const {
|
|||||||
unsigned Attribute::getAlignment() const {
|
unsigned Attribute::getAlignment() const {
|
||||||
if (!hasAttribute(Attribute::Alignment))
|
if (!hasAttribute(Attribute::Alignment))
|
||||||
return 0;
|
return 0;
|
||||||
return 1U << ((pImpl->getAlignment() >> 16) - 1);
|
return pImpl->getAlignment();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This returns the stack alignment field of an attribute as a byte alignment
|
/// This returns the stack alignment field of an attribute as a byte alignment
|
||||||
@@ -81,7 +81,7 @@ unsigned Attribute::getAlignment() const {
|
|||||||
unsigned Attribute::getStackAlignment() const {
|
unsigned Attribute::getStackAlignment() const {
|
||||||
if (!hasAttribute(Attribute::StackAlignment))
|
if (!hasAttribute(Attribute::StackAlignment))
|
||||||
return 0;
|
return 0;
|
||||||
return 1U << ((pImpl->getStackAlignment() >> 26) - 1);
|
return pImpl->getStackAlignment();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Attribute::operator==(AttrKind K) const {
|
bool Attribute::operator==(AttrKind K) const {
|
||||||
@@ -491,11 +491,13 @@ bool AttributeImpl::hasAttributes() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint64_t AttributeImpl::getAlignment() const {
|
uint64_t AttributeImpl::getAlignment() const {
|
||||||
return Raw() & getAttrMask(Attribute::Alignment);
|
uint64_t Mask = Raw() & getAttrMask(Attribute::Alignment);
|
||||||
|
return 1U << ((Mask >> 16) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t AttributeImpl::getStackAlignment() const {
|
uint64_t AttributeImpl::getStackAlignment() const {
|
||||||
return Raw() & getAttrMask(Attribute::StackAlignment);
|
uint64_t Mask = Raw() & getAttrMask(Attribute::StackAlignment);
|
||||||
|
return 1U << ((Mask >> 26) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttributeImpl::Profile(FoldingSetNodeID &ID, Constant *Data,
|
void AttributeImpl::Profile(FoldingSetNodeID &ID, Constant *Data,
|
||||||
|
Reference in New Issue
Block a user