mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 07:01:03 +08:00
[lldb][TypeSynthetic][NFC] Make SyntheticChildrenFrontend::Update() return an enum (#80167)
This patch changes the return value of `SyntheticChildrenFrontend::Update` to a scoped enum that aims to describe what the return value means.
This commit is contained in:
@@ -190,11 +190,13 @@ size_t ScriptedSyntheticChildren::FrontEnd::CalculateNumChildren(uint32_t max) {
|
||||
return m_interpreter->CalculateNumChildren(m_wrapper_sp, max);
|
||||
}
|
||||
|
||||
bool ScriptedSyntheticChildren::FrontEnd::Update() {
|
||||
lldb::ChildCacheState ScriptedSyntheticChildren::FrontEnd::Update() {
|
||||
if (!m_wrapper_sp || m_interpreter == nullptr)
|
||||
return false;
|
||||
return lldb::ChildCacheState::eRefetch;
|
||||
|
||||
return m_interpreter->UpdateSynthProviderInstance(m_wrapper_sp);
|
||||
return m_interpreter->UpdateSynthProviderInstance(m_wrapper_sp)
|
||||
? lldb::ChildCacheState::eReuse
|
||||
: lldb::ChildCacheState::eRefetch;
|
||||
}
|
||||
|
||||
bool ScriptedSyntheticChildren::FrontEnd::MightHaveChildren() {
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
return child_sp;
|
||||
}
|
||||
|
||||
bool Update() override {
|
||||
lldb::ChildCacheState Update() override {
|
||||
m_parent_format = m_backend.GetFormat();
|
||||
CompilerType parent_type(m_backend.GetCompilerType());
|
||||
CompilerType element_type;
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
::CalculateNumChildren(element_type, num_elements, m_child_type)
|
||||
.value_or(0);
|
||||
m_item_format = GetItemFormatForFormat(m_parent_format, m_child_type);
|
||||
return false;
|
||||
return lldb::ChildCacheState::eRefetch;
|
||||
}
|
||||
|
||||
bool MightHaveChildren() override { return true; }
|
||||
|
||||
Reference in New Issue
Block a user