mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 22:50:47 +00:00
Duncan pointed out that we can fast fail here, because the sret parameter of
a function must be the first parameter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47254 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ae708a3d91
commit
9eb948b466
@ -107,7 +107,8 @@ bool Argument::hasNoAliasAttr() const {
|
||||
/// it in its containing function.
|
||||
bool Argument::hasStructRetAttr() const {
|
||||
if (!isa<PointerType>(getType())) return false;
|
||||
return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::StructRet);
|
||||
if (getArgNo()) return false; // StructRet param must be first param
|
||||
return getParent()->paramHasAttr(1, ParamAttr::StructRet);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user