[Lldb-commits] [lldb] afdfb3a - [lldb] Skip TestCoroutineHandle.py on libstdc++<11
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 26 05:04:38 PDT 2022
Author: Pavel Labath
Date: 2022-08-26T14:04:04+02:00
New Revision: afdfb3ae6b07b546b56b7ef1fbee26b7ad2bcfe7
URL: https://github.com/llvm/llvm-project/commit/afdfb3ae6b07b546b56b7ef1fbee26b7ad2bcfe7
DIFF: https://github.com/llvm/llvm-project/commit/afdfb3ae6b07b546b56b7ef1fbee26b7ad2bcfe7.diff
LOG: [lldb] Skip TestCoroutineHandle.py on libstdc++<11
Added:
Modified:
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/main.cpp
Removed:
################################################################################
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
index 50cac6ebff7fd..8288fcff6aae4 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/TestCoroutineHandle.py
@@ -23,6 +23,10 @@ def do_test(self, stdlib_type):
# Run until the initial suspension point
lldbutil.run_to_source_breakpoint(self, '// Break at initial_suspend',
lldb.SBFileSpec("main.cpp", False))
+
+ if self.frame().FindVariable("is_supported").GetValueAsUnsigned(1) == 0:
+ self.skipTest("c++ library not supported")
+
# Check that we show the correct function pointers and the `promise`.
self.expect_expr("gen.hdl",
result_summary=re.compile("^coro frame = 0x[0-9a-f]*$"),
diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/main.cpp b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/main.cpp
index 6a54912459c80..439a25866d1c0 100644
--- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/main.cpp
+++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/coroutine_handle/main.cpp
@@ -1,5 +1,13 @@
#include <coroutine>
+bool is_implementation_supported() {
+#ifdef _GLIBCXX_RELEASE
+ return _GLIBCXX_RELEASE >= 11;
+#else
+ return true;
+#endif
+}
+
// `int_generator` is a stripped down, minimal coroutine generator
// type.
struct int_generator {
@@ -32,6 +40,7 @@ int_generator my_generator_func() { co_yield 42; }
void empty_function_so_we_can_set_a_breakpoint() {}
int main() {
+ bool is_supported = is_implementation_supported();
int_generator gen = my_generator_func();
std::coroutine_handle<> type_erased_hdl = gen.hdl;
gen.hdl.resume(); // Break at initial_suspend
More information about the lldb-commits
mailing list