Skip to content

Commit 69c2a7c

Browse files
committed
fixup! remove new compressed_pair layout for now
1 parent 1575ca2 commit 69c2a7c

File tree

3 files changed

+6
-53
lines changed

3 files changed

+6
-53
lines changed

lldb/packages/Python/lldbsuite/test/make/libcxx-simulators-common/compressed_pair.h

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace std {
77
namespace __lldb {
88

9-
#if COMPRESSED_PAIR_REV == 0 // Post-c88580c layout
9+
// Post-c88580c layout
1010
struct __value_init_tag {};
1111
struct __default_init_tag {};
1212

@@ -51,38 +51,6 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
5151

5252
_T1 &first() { return static_cast<_Base1 &>(*this).__get(); }
5353
};
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-
61-
#define _LLDB_COMPRESSED_PAIR(T1, Initializer1, T2, Initializer2) \
62-
[[__gnu__::__aligned__(alignof(T2))]] [[no_unique_address]] T1 Initializer1; \
63-
[[no_unique_address]] __compressed_pair_padding<T1> __padding1_; \
64-
[[no_unique_address]] T2 Initializer2; \
65-
[[no_unique_address]] __compressed_pair_padding<T2> __padding2_;
66-
67-
#define _LLDB_COMPRESSED_TRIPLE(T1, Initializer1, T2, Initializer2, T3, \
68-
Initializer3) \
69-
[[using __gnu__: __aligned__(alignof(T2)), \
70-
__aligned__(alignof(T3))]] [[no_unique_address]] T1 Initializer1; \
71-
[[no_unique_address]] __compressed_pair_padding<T1> __padding1_; \
72-
[[no_unique_address]] T2 Initializer2; \
73-
[[no_unique_address]] __compressed_pair_padding<T2> __padding2_; \
74-
[[no_unique_address]] T3 Initializer3; \
75-
[[no_unique_address]] __compressed_pair_padding<T3> __padding3_;
76-
#elif COMPRESSED_PAIR_REV == 2
77-
#define _LLDB_COMPRESSED_PAIR(T1, Name1, T2, Name2) \
78-
[[no_unique_address]] T1 Name1; \
79-
[[no_unique_address]] T2 Name2
80-
81-
#define _LLDB_COMPRESSED_TRIPLE(T1, Name1, T2, Name2, T3, Name3) \
82-
[[no_unique_address]] T1 Name1; \
83-
[[no_unique_address]] T2 Name2; \
84-
[[no_unique_address]] T3 Name3
85-
#endif
8654
} // namespace __lldb
8755
} // namespace std
8856

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/TestDataFormatterLibcxxUniquePtrSimulator.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,18 @@
77
from lldbsuite.test.decorators import *
88
from lldbsuite.test.lldbtest import *
99
from lldbsuite.test import lldbutil
10-
import functools
1110

1211

1312
class LibcxxUniquePtrDataFormatterSimulatorTestCase(TestBase):
1413
NO_DEBUG_INFO_TESTCASE = True
1514

16-
def _run_test(self, defines):
17-
cxxflags_extras = " ".join(["-D%s" % d for d in defines])
18-
self.build(dictionary=dict(CXXFLAGS_EXTRAS=cxxflags_extras))
15+
def test(self):
16+
self.build()
1917
lldbutil.run_to_source_breakpoint(
20-
self, "// Break here", lldb.SBFileSpec("main.cpp")
18+
self, "Break here", lldb.SBFileSpec("main.cpp")
2119
)
2220
self.expect("frame variable var_up", substrs=["pointer ="])
2321
self.expect("frame variable var_up", substrs=["deleter ="], matching=False)
2422
self.expect(
2523
"frame variable var_with_deleter_up", substrs=["pointer =", "deleter ="]
2624
)
27-
28-
29-
for r in range(3):
30-
name = "test_r%d" % r
31-
defines = ["COMPRESSED_PAIR_REV=%d" % r]
32-
f = functools.partialmethod(
33-
LibcxxUniquePtrDataFormatterSimulatorTestCase._run_test, defines
34-
)
35-
setattr(LibcxxUniquePtrDataFormatterSimulatorTestCase, name, f)

lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx-simulators/unique_ptr/main.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,9 @@ template <class _Tp, class _Dp = default_delete<_Tp>> class unique_ptr {
1414
typedef _Dp deleter_type;
1515
typedef _Tp *pointer;
1616

17-
#if COMPRESSED_PAIR_REV == 0
1817
std::__lldb::__compressed_pair<pointer, deleter_type> __ptr_;
1918
explicit unique_ptr(pointer __p) noexcept
2019
: __ptr_(__p, std::__lldb::__value_init_tag()) {}
21-
#elif COMPRESSED_PAIR_REV == 1 || COMPRESSED_PAIR_REV == 2
22-
_LLDB_COMPRESSED_PAIR(pointer, __ptr_, deleter_type, __deleter_);
23-
explicit unique_ptr(pointer __p) noexcept : __ptr_(__p), __deleter_() {}
24-
#endif
2520
};
2621
} // namespace __lldb
2722
} // namespace std
@@ -37,5 +32,6 @@ struct StatefulDeleter {
3732
int main() {
3833
std::__lldb::unique_ptr<int> var_up(new int(5));
3934
std::__lldb::unique_ptr<int, StatefulDeleter> var_with_deleter_up(new int(5));
40-
return 0; // Break here
35+
__builtin_printf("Break here\n");
36+
return 0;
4137
}

0 commit comments

Comments
 (0)