@@ -183,40 +183,50 @@ template <class _CharT, class _Traits, class _Allocator> class basic_string {
183
183
};
184
184
};
185
185
186
+ __long &getLongRep () {
187
+ #if COMPRESSED_PAIR_REV == 0
188
+ return __r_.first ().__l
189
+ #elif COMPRESSED_PAIR_REV <= 2
190
+ return __rep_.__l ;
191
+ #endif
192
+ }
193
+
194
+ __short &getShortRep () {
195
+ #if COMPRESSED_PAIR_REV == 0
196
+ return __r_.first ().__s
197
+ #elif COMPRESSED_PAIR_REV <= 2
198
+ return __rep_.__s ;
199
+ #endif
200
+ }
201
+
186
202
#if COMPRESSED_PAIR_REV == 0
187
203
std::__lldb::__compressed_pair<__rep, allocator_type> __r_;
188
- #define __R_ __r_
189
- #define __R_L __r_.first().__l
190
- #define __R_S __r_.first().__s
191
204
#elif COMPRESSED_PAIR_REV <= 2
192
205
_LLDB_COMPRESSED_PAIR (__rep, __rep_, allocator_type, __alloc_);
193
- #define __R_ __rep_
194
- #define __R_L __rep_.__l
195
- #define __R_S __rep_.__s
196
206
#endif
197
207
198
208
public:
199
209
template <size_t __N>
200
210
basic_string (unsigned char __size, const value_type (&__data)[__N]) {
201
211
static_assert (__N < __min_cap, " " );
202
212
#ifdef BITMASKS
203
- __R_S .__size_ = __size << __short_shift;
213
+ getShortRep () .__size_ = __size << __short_shift;
204
214
#else
205
- __R_S .__size_ = __size;
206
- __R_S .__is_long_ = false ;
215
+ getShortRep () .__size_ = __size;
216
+ getShortRep () .__is_long_ = false ;
207
217
#endif
208
218
for (size_t __i = 0 ; __i < __N; ++__i)
209
- __R_S .__data_ [__i] = __data[__i];
219
+ getShortRep () .__data_ [__i] = __data[__i];
210
220
}
211
221
basic_string (size_t __cap, size_type __size, pointer __data) {
212
222
#ifdef BITMASKS
213
- __R_L .__cap_ = __cap | __long_mask;
223
+ getLongRep () .__cap_ = __cap | __long_mask;
214
224
#else
215
- __R_L .__cap_ = __cap / __endian_factor;
216
- __R_L .__is_long_ = true ;
225
+ getLongRep () .__cap_ = __cap / __endian_factor;
226
+ getLongRep () .__is_long_ = true ;
217
227
#endif
218
- __R_L .__size_ = __size;
219
- __R_L .__data_ = __data;
228
+ getLongRep () .__size_ = __size;
229
+ getLongRep () .__data_ = __data;
220
230
}
221
231
};
222
232
0 commit comments