diff options
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Function.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index e7a7041d778..ec34abc1067 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -107,7 +107,7 @@ bool Argument::hasNoAliasAttr() const { /// it in its containing function. bool Argument::hasStructRetAttr() const { if (!isa<PointerType>(getType())) return false; - if (getArgNo()) return false; // StructRet param must be first param + if (this != getParent()->arg_begin()) return false; // StructRet param must be first param return getParent()->paramHasAttr(1, ParamAttr::StructRet); } |

