jingham created this revision. jingham added reviewers: JDevlieghere, mib. jingham requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
This owning_sp has no uses and the ValueObjectDynamicValue already tracks its ownership through the parent it is passed when made. I can't find any vestiges of the use of this API, maybe it was from some earlier design? Resetting the backing ivar was the only job the destructor did, so I set that to default as well. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D112677 Files: lldb/include/lldb/Core/ValueObjectDynamicValue.h lldb/source/Core/ValueObjectDynamicValue.cpp Index: lldb/source/Core/ValueObjectDynamicValue.cpp =================================================================== --- lldb/source/Core/ValueObjectDynamicValue.cpp +++ lldb/source/Core/ValueObjectDynamicValue.cpp @@ -36,10 +36,6 @@ SetName(parent.GetName()); } -ValueObjectDynamicValue::~ValueObjectDynamicValue() { - m_owning_valobj_sp.reset(); -} - CompilerType ValueObjectDynamicValue::GetCompilerTypeImpl() { const bool success = UpdateValueIfNeeded(false); if (success) { Index: lldb/include/lldb/Core/ValueObjectDynamicValue.h =================================================================== --- lldb/include/lldb/Core/ValueObjectDynamicValue.h +++ lldb/include/lldb/Core/ValueObjectDynamicValue.h @@ -32,7 +32,7 @@ /// set lldb type. class ValueObjectDynamicValue : public ValueObject { public: - ~ValueObjectDynamicValue() override; + ~ValueObjectDynamicValue() = default; llvm::Optional<uint64_t> GetByteSize() override; @@ -68,14 +68,6 @@ lldb::ValueObjectSP GetStaticValue() override { return m_parent->GetSP(); } - void SetOwningSP(lldb::ValueObjectSP &owning_sp) { - if (m_owning_valobj_sp == owning_sp) - return; - - assert(m_owning_valobj_sp.get() == nullptr); - m_owning_valobj_sp = owning_sp; - } - bool SetValueFromCString(const char *value_str, Status &error) override; bool SetData(DataExtractor &data, Status &error) override; @@ -117,7 +109,6 @@ Address m_address; ///< The variable that this value object is based upon TypeAndOrName m_dynamic_type_info; // We can have a type_sp or just a name - lldb::ValueObjectSP m_owning_valobj_sp; lldb::DynamicValueType m_use_dynamic; TypeImpl m_type_impl;
Index: lldb/source/Core/ValueObjectDynamicValue.cpp =================================================================== --- lldb/source/Core/ValueObjectDynamicValue.cpp +++ lldb/source/Core/ValueObjectDynamicValue.cpp @@ -36,10 +36,6 @@ SetName(parent.GetName()); } -ValueObjectDynamicValue::~ValueObjectDynamicValue() { - m_owning_valobj_sp.reset(); -} - CompilerType ValueObjectDynamicValue::GetCompilerTypeImpl() { const bool success = UpdateValueIfNeeded(false); if (success) { Index: lldb/include/lldb/Core/ValueObjectDynamicValue.h =================================================================== --- lldb/include/lldb/Core/ValueObjectDynamicValue.h +++ lldb/include/lldb/Core/ValueObjectDynamicValue.h @@ -32,7 +32,7 @@ /// set lldb type. class ValueObjectDynamicValue : public ValueObject { public: - ~ValueObjectDynamicValue() override; + ~ValueObjectDynamicValue() = default; llvm::Optional<uint64_t> GetByteSize() override; @@ -68,14 +68,6 @@ lldb::ValueObjectSP GetStaticValue() override { return m_parent->GetSP(); } - void SetOwningSP(lldb::ValueObjectSP &owning_sp) { - if (m_owning_valobj_sp == owning_sp) - return; - - assert(m_owning_valobj_sp.get() == nullptr); - m_owning_valobj_sp = owning_sp; - } - bool SetValueFromCString(const char *value_str, Status &error) override; bool SetData(DataExtractor &data, Status &error) override; @@ -117,7 +109,6 @@ Address m_address; ///< The variable that this value object is based upon TypeAndOrName m_dynamic_type_info; // We can have a type_sp or just a name - lldb::ValueObjectSP m_owning_valobj_sp; lldb::DynamicValueType m_use_dynamic; TypeImpl m_type_impl;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits