Skip to content

Commit a9056fe

Browse files
Merge pull request #8386 from adrian-prantl/124487859
Retire DynamicValueTypeInfoNeedsUpdate() (NFC)
2 parents 14345fd + e472464 commit a9056fe

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

lldb/include/lldb/Core/ValueObjectDynamicValue.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@ class ValueObjectDynamicValue : public ValueObject {
106106

107107
bool HasDynamicValueTypeInfo() override { return true; }
108108

109-
/// Determine whether the scratch AST context has been replaced
110-
/// since this dynamic type has been created.
111-
bool DynamicValueTypeInfoNeedsUpdate();
112-
113109
CompilerType GetCompilerTypeImpl() override;
114110

115111
Address m_address; ///< The variable that this value object is based upon

lldb/source/Core/ValueObject.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,6 @@ bool ValueObject::UpdateValueIfNeeded(bool update_format) {
129129

130130
bool did_change_formats = false;
131131

132-
// BEGIN SWIFT
133-
// Swift: Check whether the dynamic type system became stale.
134-
if (m_dynamic_value) {
135-
auto *dyn_val = static_cast<ValueObjectDynamicValue *>(m_dynamic_value);
136-
if (dyn_val->DynamicValueTypeInfoNeedsUpdate()) {
137-
dyn_val->SetNeedsUpdate();
138-
SetNeedsUpdate();
139-
}
140-
}
141-
// END SWIFT
142-
143132
if (update_format)
144133
did_change_formats = UpdateFormatsIfNeeded();
145134

lldb/source/Core/ValueObjectDynamicValue.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -440,23 +440,3 @@ void ValueObjectDynamicValue::SetLanguageFlags(uint64_t flags) {
440440
else
441441
this->ValueObject::SetLanguageFlags(flags);
442442
}
443-
444-
bool ValueObjectDynamicValue::DynamicValueTypeInfoNeedsUpdate() {
445-
if (GetPreferredDisplayLanguage() != eLanguageTypeSwift)
446-
return false;
447-
448-
if (!m_dynamic_type_info.HasType())
449-
return false;
450-
451-
#ifdef LLDB_ENABLE_SWIFT
452-
auto cached_ctx = m_value.GetCompilerType().GetTypeSystem();
453-
std::optional<SwiftScratchContextReader> scratch_ctx(
454-
GetSwiftScratchContext());
455-
456-
if (!scratch_ctx || !cached_ctx)
457-
return true;
458-
return (void*)cached_ctx.GetSharedPointer().get() != (void*)scratch_ctx->get();
459-
#else // !LLDB_ENABLE_SWIFT
460-
return false;
461-
#endif // LLDB_ENABLE_SWIFT
462-
}

0 commit comments

Comments
 (0)