mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Add a predicate to Argument to check for the StructRet attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9b636cb338
commit
7d54254c9c
@ -57,6 +57,10 @@ public:
|
||||
/// it in its containing function.
|
||||
bool hasNoAliasAttr() const;
|
||||
|
||||
/// hasSRetAttr - Return true if this argument has the sret attribute on it in
|
||||
/// its containing function.
|
||||
bool hasStructRetAttr() const;
|
||||
|
||||
virtual void print(std::ostream &OS) const;
|
||||
void print(std::ostream *OS) const {
|
||||
if (OS) print(*OS);
|
||||
|
@ -103,6 +103,13 @@ bool Argument::hasNoAliasAttr() const {
|
||||
return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::NoAlias);
|
||||
}
|
||||
|
||||
/// hasSRetAttr - Return true if this argument has the sret attribute on
|
||||
/// it in its containing function.
|
||||
bool Argument::hasStructRetAttr() const {
|
||||
if (!isa<PointerType>(getType())) return false;
|
||||
return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::StructRet);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user