LLDB mainline
Coroutines.h
Go to the documentation of this file.
1//===-- Coroutines.h --------------------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_COROUTINES_H
10#define LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_COROUTINES_H
11
15#include "lldb/Utility/Stream.h"
16
17namespace lldb_private {
18
19namespace formatters {
20
21/// Summary provider for `std::coroutine_handle<T>` from libc++, libstdc++ and
22/// MSVC STL.
23bool StdlibCoroutineHandleSummaryProvider(ValueObject &valobj, Stream &stream,
24 const TypeSummaryOptions &options);
25
26/// Synthetic children frontend for `std::coroutine_handle<promise_type>` from
27/// libc++, libstdc++ and MSVC STL. Shows the compiler-generated `resume` and
28/// `destroy` function pointers as well as the `promise`, if the promise type
29/// is `promise_type != void`.
32public:
34
36
37 llvm::Expected<uint32_t> CalculateNumChildren() override;
38
39 lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override;
40
42
43 bool MightHaveChildren() override;
44
45 size_t GetIndexOfChildWithName(ConstString name) override;
46
47private:
51};
52
56
57} // namespace formatters
58} // namespace lldb_private
59
60#endif // LLDB_SOURCE_PLUGINS_LANGUAGE_CPLUSPLUS_COROUTINES_H
A uniqued constant string class.
Definition: ConstString.h:40
Synthetic children frontend for std::coroutine_handle<promise_type> from libc++, libstdc++ and MSVC S...
Definition: Coroutines.h:31
lldb::ChildCacheState Update() override
This function is assumed to always succeed and if it fails, the front-end should know to deal with it...
Definition: Coroutines.cpp:131
llvm::Expected< uint32_t > CalculateNumChildren() override
Definition: Coroutines.cpp:110
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
Definition: Coroutines.cpp:118
SyntheticChildrenFrontEnd * StdlibCoroutineHandleSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: Coroutines.cpp:223
bool StdlibCoroutineHandleSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Summary provider for std::coroutine_handle<T> from libc++, libstdc++ and MSVC STL.
Definition: Coroutines.cpp:83
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:480