@@ -71,14 +71,15 @@ namespace llvm {
71
71
72
72
// / Construct an ArrayRef from a single element.
73
73
/* implicit*/ ArrayRef (const T &OneElt LLVM_LIFETIME_BOUND)
74
- : Data (&OneElt), Length (1 ) {}
74
+ : Data (&OneElt), Length (1 ) {}
75
75
76
76
// / Construct an ArrayRef from a pointer and length.
77
- constexpr /* implicit*/ ArrayRef (const T *data, size_t length)
77
+ constexpr /* implicit*/ ArrayRef (const T *data LLVM_LIFETIME_BOUND,
78
+ size_t length)
78
79
: Data (data), Length (length) {}
79
80
80
81
// / Construct an ArrayRef from a range.
81
- constexpr ArrayRef (const T *begin, const T *end)
82
+ constexpr ArrayRef (const T *begin LLVM_LIFETIME_BOUND , const T *end)
82
83
: Data (begin), Length (end - begin) {
83
84
assert (begin <= end);
84
85
}
@@ -114,7 +115,8 @@ namespace llvm {
114
115
#pragma GCC diagnostic push
115
116
#pragma GCC diagnostic ignored "-Winit-list-lifetime"
116
117
#endif
117
- constexpr /* implicit*/ ArrayRef (std::initializer_list<T> Vec)
118
+ constexpr /* implicit*/ ArrayRef (
119
+ std::initializer_list<T> Vec LLVM_LIFETIME_BOUND)
118
120
: Data (Vec.begin () == Vec.end () ? (T *)nullptr : Vec.begin ()),
119
121
Length (Vec.size ()) {}
120
122
#if LLVM_GNUC_PREREQ(9, 0, 0)
0 commit comments