diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-02-16 12:13:30 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-02-16 12:13:30 +0000 |
commit | 913f07af6e467529ec2a10f6fe88042f461ee330 (patch) | |
tree | 3f02a69e9c4bbb0eec3434351a523a43d28da93f /lldb/packages/Python/lldbsuite | |
parent | 87992de487362c64720710caaa14f404e06746c6 (diff) | |
download | bcm5719-llvm-913f07af6e467529ec2a10f6fe88042f461ee330.tar.gz bcm5719-llvm-913f07af6e467529ec2a10f6fe88042f461ee330.zip |
Fix TestDataFormatterLibcxxListLoop.py test
Summary:
The compilation of the TestDataFormatterLibcxxListLoop.py currently fails with this error:
```
functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp:19:24: error: no member named '__value_' in 'std::__1::__list_node_base<int, void *>'
assert(third_elem->__value_ == 3);
~~~~~~~~~~ ^
```
It seems the internal structure of list has changed with the 3.8 release. This patch makes the test compile with the current libc++ and with the previous libc++.
Reviewers: shafik, zturner, labath
Reviewed By: labath
Subscribers: christof, jdoerfert, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D58273
llvm-svn: 354202
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp index 7c623e9a68b..e07e93838b9 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/main.cpp @@ -15,10 +15,18 @@ int main() int_list *numbers_list = new int_list{1,2,3,4,5,6,7,8,9,10}; printf("// Set break point at this line."); + +#if _LIBCPP_VERSION >= 3800 + auto *third_elem = numbers_list->__end_.__next_->__next_->__next_; + assert(third_elem->__as_node()->__value_ == 3); + auto *fifth_elem = third_elem->__next_->__next_; + assert(fifth_elem->__as_node()->__value_ == 5); +#else auto *third_elem = numbers_list->__end_.__next_->__next_->__next_; assert(third_elem->__value_ == 3); auto *fifth_elem = third_elem->__next_->__next_; assert(fifth_elem->__value_ == 5); +#endif fifth_elem->__next_ = third_elem; #endif |