llvm.org GIT mirror llvm / 7d54254
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 Owen Anderson 12 years ago
2 changed file(s) with 11 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5656 /// it in its containing function.
5757 bool hasNoAliasAttr() const;
5858
59 /// hasSRetAttr - Return true if this argument has the sret attribute on it in
60 /// its containing function.
61 bool hasStructRetAttr() const;
62
5963 virtual void print(std::ostream &OS) const;
6064 void print(std::ostream *OS) const {
6165 if (OS) print(*OS);
100100 bool Argument::hasNoAliasAttr() const {
101101 if (!isa(getType())) return false;
102102 return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::NoAlias);
103 }
104
105 /// hasSRetAttr - Return true if this argument has the sret attribute on
106 /// it in its containing function.
107 bool Argument::hasStructRetAttr() const {
108 if (!isa(getType())) return false;
109 return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::StructRet);
103110 }
104111
105112