aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ParameterAttributes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/ParameterAttributes.h b/include/llvm/ParameterAttributes.h
index dcfe095141..c2d60786c2 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.