mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-27 05:10:41 +00:00
add a helper method to get the byval alignment of an argument.
llvm-svn: 131883
This commit is contained in:
parent
ca9723d80b
commit
5fd8380a35
@ -51,6 +51,9 @@ public:
|
||||
/// hasByValAttr - Return true if this argument has the byval attribute on it
|
||||
/// in its containing function.
|
||||
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
|
||||
/// it in its containing function.
|
||||
|
@ -79,6 +79,12 @@ bool Argument::hasByValAttr() const {
|
||||
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
|
||||
/// it in its containing function.
|
||||
bool Argument::hasNestAttr() const {
|
||||
|
Loading…
Reference in New Issue
Block a user