Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions lldb/source/Plugins/Language/Swift/FoundationValueTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,20 +605,18 @@ class URLComponentsSyntheticChildrenFrontEnd
m_synth_backend_up()
#define COMPONENT(Name, PrettyName, ID) , m_##Name(nullptr)
#include "URLComponents.def"
{
SetValid(false);
}
{}

~URLComponentsSyntheticChildrenFrontEnd() override = default;

llvm::Expected<uint32_t> CalculateNumChildren() override {
if (IsValid())
if (m_valid)
return 9;
return 0;
}

lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override {
if (IsValid()) {
if (m_valid) {
switch (idx) {
#define COMPONENT(Name, PrettyName, ID) \
case ID: \
Expand Down Expand Up @@ -646,7 +644,7 @@ class URLComponentsSyntheticChildrenFrontEnd
#define COMPONENT(Name, PrettyName, ID) m_##Name = nullptr;
#include "URLComponents.def"

SetValid(false);
m_valid = false;

ValueObjectSP underlying_sp =
m_backend.GetChildAtNamePath({g__handle, g__pointer});
Expand Down Expand Up @@ -686,7 +684,7 @@ class URLComponentsSyntheticChildrenFrontEnd
m_##Name->SetName(GetNameFor##Name());
#include "URLComponents.def"

SetValid(CheckValid());
m_valid = CheckValid();

return ChildCacheState::eRefetch;
}
Expand All @@ -712,6 +710,7 @@ class URLComponentsSyntheticChildrenFrontEnd

SyntheticChildrenFrontEnd::AutoPointer m_synth_frontend_up;
std::unique_ptr<ObjCRuntimeSyntheticProvider> m_synth_backend_up;
bool m_valid = false;
#define COMPONENT(Name, PrettyName, ID) ValueObject *m_##Name;
#include "URLComponents.def"

Expand Down