Hi Owen,

> +bool Argument::hasStructRetAttr() const {
> +  if (!isa<PointerType>(getType())) return false;
> +  return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::StructRet);
> +}

since the sret argument (if any) must be the first argument,
you could also do a quick return if the argument number is not 0.

Ciao,

Duncan.
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to