From 66250e97eff4f9e7dd097ccc50a78446bf013a4c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 18 Jun 2007 21:50:49 +0000 Subject: [PATCH] add helper git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37631 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ParameterAttributes.h | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- 2.34.1