mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
Revert "Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected (#84219)"
This reverts commit 99118c8093.
This commit is contained in:
@@ -126,21 +126,17 @@ ConstString ValueObjectMemory::GetDisplayTypeName() {
|
||||
return m_compiler_type.GetDisplayTypeName();
|
||||
}
|
||||
|
||||
llvm::Expected<uint32_t> ValueObjectMemory::CalculateNumChildren(uint32_t max) {
|
||||
uint32_t ValueObjectMemory::CalculateNumChildren(uint32_t max) {
|
||||
if (m_type_sp) {
|
||||
auto child_count = m_type_sp->GetNumChildren(true);
|
||||
if (!child_count)
|
||||
return child_count;
|
||||
return *child_count <= max ? *child_count : max;
|
||||
return child_count <= max ? child_count : max;
|
||||
}
|
||||
|
||||
ExecutionContext exe_ctx(GetExecutionContextRef());
|
||||
const bool omit_empty_base_classes = true;
|
||||
auto child_count =
|
||||
m_compiler_type.GetNumChildren(omit_empty_base_classes, &exe_ctx);
|
||||
if (!child_count)
|
||||
return child_count;
|
||||
return *child_count <= max ? *child_count : max;
|
||||
return child_count <= max ? child_count : max;
|
||||
}
|
||||
|
||||
std::optional<uint64_t> ValueObjectMemory::GetByteSize() {
|
||||
|
||||
Reference in New Issue
Block a user