mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Provide convenient access to the zext/sext attributes of function arguments. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6035518e3b
commit
d047a9df7d
@ -105,6 +105,14 @@ public:
|
||||
/// its containing function.
|
||||
bool hasInAllocaAttr() const;
|
||||
|
||||
/// \brief Return true if this argument has the zext attribute on it in its
|
||||
/// containing function.
|
||||
bool hasZExtAttr() const;
|
||||
|
||||
/// \brief Return true if this argument has the sext attribute on it in its
|
||||
/// containing function.
|
||||
bool hasSExtAttr() const;
|
||||
|
||||
/// \brief Add a Attribute to an argument.
|
||||
void addAttr(AttributeSet AS);
|
||||
|
||||
|
@ -166,6 +166,20 @@ bool Argument::hasReturnedAttr() const {
|
||||
hasAttribute(getArgNo()+1, Attribute::Returned);
|
||||
}
|
||||
|
||||
/// hasZExtAttr - Return true if this argument has the zext attribute on it in
|
||||
/// its containing function.
|
||||
bool Argument::hasZExtAttr() const {
|
||||
return getParent()->getAttributes().
|
||||
hasAttribute(getArgNo()+1, Attribute::ZExt);
|
||||
}
|
||||
|
||||
/// hasSExtAttr Return true if this argument has the sext attribute on it in its
|
||||
/// containing function.
|
||||
bool Argument::hasSExtAttr() const {
|
||||
return getParent()->getAttributes().
|
||||
hasAttribute(getArgNo()+1, Attribute::SExt);
|
||||
}
|
||||
|
||||
/// Return true if this argument has the readonly or readnone attribute on it
|
||||
/// in its containing function.
|
||||
bool Argument::onlyReadsMemory() const {
|
||||
|
Loading…
Reference in New Issue
Block a user