From b4f2d8a056801b17b80c26d0b4e29fe4672f4d74 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 18 Jun 2007 21:50:49 +0000 Subject: [PATCH] add helper llvm-svn: 37631 --- llvm/include/llvm/ParameterAttributes.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/include/llvm/ParameterAttributes.h b/llvm/include/llvm/ParameterAttributes.h index dcfe09514117..c2d60786c259 100644 --- a/llvm/include/llvm/ParameterAttributes.h +++ b/llvm/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.