|
20 | 20 | // Pre-D128285 layout.
|
21 | 21 | #define PACKED_ANON_STRUCT
|
22 | 22 | #endif
|
23 |
| -#if REVISION <= 4 |
24 |
| -// Pre-2a1ef74 layout. |
25 |
| -#define NON_STANDARD_PADDING |
26 |
| -#endif |
27 |
| -// REVISION == 5: current layout |
| 23 | +// REVISION == 4: current layout |
28 | 24 |
|
29 | 25 | #ifdef PACKED_ANON_STRUCT
|
30 | 26 | #define BEGIN_PACKED_ANON_STRUCT struct __attribute__((packed)) {
|
|
38 | 34 | namespace std {
|
39 | 35 | namespace __lldb {
|
40 | 36 |
|
41 |
| -#ifdef NON_STANDARD_PADDING |
42 | 37 | #if defined(ALTERNATE_LAYOUT) && defined(SUBCLASS_PADDING)
|
43 | 38 | template <class _CharT, size_t = sizeof(_CharT)> struct __padding {
|
44 | 39 | unsigned char __xx[sizeof(_CharT) - 1];
|
45 | 40 | };
|
46 | 41 |
|
47 | 42 | template <class _CharT> struct __padding<_CharT, 1> {};
|
48 | 43 | #endif
|
49 |
| -#else // !NON_STANDARD_PADDING |
50 |
| -template <size_t _PaddingSize> struct __padding { |
51 |
| - char __padding_[_PaddingSize]; |
52 |
| -}; |
53 |
| - |
54 |
| -template <> struct __padding<0> {}; |
55 |
| -#endif |
56 | 44 |
|
57 | 45 | template <class _CharT, class _Traits, class _Allocator> class basic_string {
|
58 | 46 | public:
|
@@ -89,12 +77,7 @@ template <class _CharT, class _Traits, class _Allocator> class basic_string {
|
89 | 77 | };
|
90 | 78 | #else // !SUBCLASS_PADDING
|
91 | 79 |
|
92 |
| -#ifdef NON_STANDARD_PADDING |
93 | 80 | unsigned char __padding[sizeof(value_type) - 1];
|
94 |
| -#else |
95 |
| - [[no_unique_address]] __padding<sizeof(value_type) - 1> __padding_; |
96 |
| -#endif |
97 |
| - |
98 | 81 | #ifdef BITMASKS
|
99 | 82 | unsigned char __size_;
|
100 | 83 | #else // !BITMASKS
|
@@ -146,26 +129,21 @@ template <class _CharT, class _Traits, class _Allocator> class basic_string {
|
146 | 129 | union {
|
147 | 130 | #ifdef BITMASKS
|
148 | 131 | unsigned char __size_;
|
149 |
| -#else // !BITMASKS |
| 132 | +#else |
150 | 133 | struct {
|
151 | 134 | unsigned char __is_long_ : 1;
|
152 | 135 | unsigned char __size_ : 7;
|
153 | 136 | };
|
154 |
| -#endif // BITMASKS |
| 137 | +#endif |
155 | 138 | value_type __lx;
|
156 | 139 | };
|
157 |
| -#else // !SHORT_UNION |
| 140 | +#else |
158 | 141 | BEGIN_PACKED_ANON_STRUCT
|
159 | 142 | unsigned char __is_long_ : 1;
|
160 | 143 | unsigned char __size_ : 7;
|
161 | 144 | END_PACKED_ANON_STRUCT
|
162 |
| -#ifdef NON_STANDARD_PADDING |
163 |
| - unsigned char __padding[sizeof(value_type) - 1]; |
164 |
| -#else // !NON_STANDARD_PADDING |
165 |
| - [[no_unique_address]] __padding<sizeof(value_type) - 1> __padding_; |
166 |
| -#endif // NON_STANDARD_PADDING |
167 |
| - |
168 |
| -#endif // SHORT_UNION |
| 145 | + char __padding_[sizeof(value_type) - 1]; |
| 146 | +#endif |
169 | 147 | value_type __data_[__min_cap];
|
170 | 148 | };
|
171 | 149 |
|
|
0 commit comments