summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ae708a3)
a function must be the first parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47254
91177308-0d34-0410-b5e6-
96231b3b80d8
/// it in its containing function.
bool Argument::hasStructRetAttr() const {
if (!isa<PointerType>(getType())) return false;
/// 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);