Index: lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp =================================================================== --- lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp +++ lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp @@ -282,9 +282,17 @@ }; 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() {}