mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
add a helper method to get the byval alignment of an argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131883 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9db20f3bd8
commit
ae441cc33c
@ -52,6 +52,9 @@ public:
|
|||||||
/// in its containing function.
|
/// in its containing function.
|
||||||
bool hasByValAttr() const;
|
bool hasByValAttr() const;
|
||||||
|
|
||||||
|
/// getParamAlignment - If this is a byval argument, return its alignment.
|
||||||
|
unsigned getParamAlignment() const;
|
||||||
|
|
||||||
/// hasNestAttr - Return true if this argument has the nest attribute on
|
/// hasNestAttr - Return true if this argument has the nest attribute on
|
||||||
/// it in its containing function.
|
/// it in its containing function.
|
||||||
bool hasNestAttr() const;
|
bool hasNestAttr() const;
|
||||||
|
@ -79,6 +79,12 @@ bool Argument::hasByValAttr() const {
|
|||||||
return getParent()->paramHasAttr(getArgNo()+1, Attribute::ByVal);
|
return getParent()->paramHasAttr(getArgNo()+1, Attribute::ByVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned Argument::getParamAlignment() const {
|
||||||
|
assert(getType()->isPointerTy() && "Only pointers have alignments");
|
||||||
|
return getParent()->getParamAlignment(getArgNo()+1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// hasNestAttr - Return true if this argument has the nest attribute on
|
/// hasNestAttr - Return true if this argument has the nest attribute on
|
||||||
/// it in its containing function.
|
/// it in its containing function.
|
||||||
bool Argument::hasNestAttr() const {
|
bool Argument::hasNestAttr() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user