From: Chris Lattner Date: Mon, 18 Jun 2007 21:50:49 +0000 (+0000) Subject: add helper X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=66250e97eff4f9e7dd097ccc50a78446bf013a4c;p=oota-llvm.git add helper git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37631 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ParameterAttributes.h b/include/llvm/ParameterAttributes.h index dcfe0951411..c2d60786c25 100644 --- a/include/llvm/ParameterAttributes.h +++ b/include/llvm/ParameterAttributes.h @@ -47,6 +47,13 @@ enum Attributes { struct ParamAttrsWithIndex { uint16_t attrs; ///< The attributes that are set, |'d together uint16_t index; ///< Index of the parameter for which the attributes apply + + static ParamAttrsWithIndex get(uint16_t idx, uint16_t attrs) { + ParamAttrsWithIndex P; + P.index = idx; + P.attrs = attrs; + return P; + } }; /// @brief A vector of attribute/index pairs.