# 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]*$"),
#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 {
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