diff options
Diffstat (limited to 'lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp')
| -rw-r--r-- | lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp b/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp index 068bca9e7b94..429633e5e6b8 100644 --- a/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp +++ b/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp @@ -33,7 +33,7 @@ class NSIndexPathSyntheticFrontEnd : public SyntheticChildrenFrontEnd { public: NSIndexPathSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp) : SyntheticChildrenFrontEnd(*valobj_sp.get()), m_descriptor_sp(nullptr), - m_impl(), m_ptr_size(0), m_uint_star_type() { + m_impl(), m_uint_star_type() { m_ptr_size = m_backend.GetTargetSP()->GetArchitecture().GetAddressByteSize(); } @@ -282,9 +282,17 @@ protected: }; void Clear() { + switch (m_mode) { + case Mode::Inlined: + m_inlined.Clear(); + break; + case Mode::Outsourced: + m_outsourced.Clear(); + break; + case Mode::Invalid: + break; + } m_mode = Mode::Invalid; - m_inlined.Clear(); - m_outsourced.Clear(); } Impl() {} @@ -292,7 +300,7 @@ protected: Mode m_mode = Mode::Invalid; } m_impl; - uint32_t m_ptr_size; + uint32_t m_ptr_size = 0; CompilerType m_uint_star_type; }; |
