mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Use findEnumAttribute helper for preallocated
This commit is contained in:
parent
e12de24e43
commit
67958cd15e
@ -925,14 +925,13 @@ MaybeAlign AttributeSetNode::getStackAlignment() const {
|
||||
Type *AttributeSetNode::getByValType() const {
|
||||
if (auto A = findEnumAttribute(Attribute::ByVal))
|
||||
return A->getValueAsType();
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Type *AttributeSetNode::getPreallocatedType() const {
|
||||
for (const auto &I : *this)
|
||||
if (I.hasAttribute(Attribute::Preallocated))
|
||||
return I.getValueAsType();
|
||||
return 0;
|
||||
if (auto A = findEnumAttribute(Attribute::Preallocated))
|
||||
return A->getValueAsType();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint64_t AttributeSetNode::getDereferenceableBytes() const {
|
||||
|
Loading…
Reference in New Issue
Block a user