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