[llvm-commits] [llvm] r47248 - in /llvm/trunk: include/llvm/Argument.h lib/VMCore/Function.cpp
Duncan Sands
baldrick at free.fr
Sun Feb 17 19:56:14 PST 2008
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.
More information about the llvm-commits
mailing list