|
1 | 1 | #ifndef STD_LLDB_COMPRESSED_PAIR_H
|
2 | 2 | #define STD_LLDB_COMPRESSED_PAIR_H
|
3 | 3 |
|
4 |
| -#include <__memory/compressed_pair.h> |
5 | 4 | #include <type_traits>
|
6 | 5 |
|
7 | 6 | namespace std {
|
@@ -53,26 +52,27 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
|
53 | 52 | _T1 &first() { return static_cast<_Base1 &>(*this).__get(); }
|
54 | 53 | };
|
55 | 54 | #elif COMPRESSED_PAIR_REV == 1
|
| 55 | +template <class _ToPad> class __compressed_pair_padding { |
| 56 | + char __padding_[(is_empty<_ToPad>::value && !__libcpp_is_final<_ToPad>::value) |
| 57 | + ? 0 |
| 58 | + : sizeof(_ToPad) - __datasizeof(_ToPad)]; |
| 59 | +}; |
| 60 | + |
56 | 61 | #define _LLDB_COMPRESSED_PAIR(T1, Initializer1, T2, Initializer2) \
|
57 | 62 | [[__gnu__::__aligned__(alignof(T2))]] [[no_unique_address]] T1 Initializer1; \
|
58 |
| - [[no_unique_address]] __compressed_pair_padding<T1> _LIBCPP_CONCAT3( \ |
59 |
| - __padding1_, __LINE__, _); \ |
| 63 | + [[no_unique_address]] __compressed_pair_padding<T1> __padding1_; \ |
60 | 64 | [[no_unique_address]] T2 Initializer2; \
|
61 |
| - [[no_unique_address]] __compressed_pair_padding<T2> _LIBCPP_CONCAT3( \ |
62 |
| - __padding2_, __LINE__, _) |
| 65 | + [[no_unique_address]] __compressed_pair_padding<T2> __padding2_; |
63 | 66 |
|
64 | 67 | #define _LLDB_COMPRESSED_TRIPLE(T1, Initializer1, T2, Initializer2, T3, \
|
65 | 68 | Initializer3) \
|
66 | 69 | [[using __gnu__: __aligned__(alignof(T2)), \
|
67 | 70 | __aligned__(alignof(T3))]] [[no_unique_address]] T1 Initializer1; \
|
68 |
| - [[no_unique_address]] __compressed_pair_padding<T1> _LIBCPP_CONCAT3( \ |
69 |
| - __padding1_, __LINE__, _); \ |
| 71 | + [[no_unique_address]] __compressed_pair_padding<T1> __padding1_; \ |
70 | 72 | [[no_unique_address]] T2 Initializer2; \
|
71 |
| - [[no_unique_address]] __compressed_pair_padding<T2> _LIBCPP_CONCAT3( \ |
72 |
| - __padding2_, __LINE__, _); \ |
| 73 | + [[no_unique_address]] __compressed_pair_padding<T2> __padding2_; \ |
73 | 74 | [[no_unique_address]] T3 Initializer3; \
|
74 |
| - [[no_unique_address]] __compressed_pair_padding<T3> _LIBCPP_CONCAT3( \ |
75 |
| - __padding3_, __LINE__, _) |
| 75 | + [[no_unique_address]] __compressed_pair_padding<T3> __padding3_; |
76 | 76 | #elif COMPRESSED_PAIR_REV == 2
|
77 | 77 | #define _LLDB_COMPRESSED_PAIR(T1, Name1, T2, Name2) \
|
78 | 78 | [[no_unique_address]] T1 Name1; \
|
|
0 commit comments