[LLDB] Fix NSIndexPathSyntheticFrontEnd::Impl::Clear() to only clear the active union member
NSIndexPathSyntheticFrontEnd::Impl::Clear() currently calls Clear() on both unions members regardless of which one is active. I modified it to only call Clear() on the active member. Differential Revision: https://reviews.llvm.org/D122753
This commit is contained in:
parent
a4b56d7620
commit
14cad95d38
|
@ -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() {}
|
||||
|
|
Loading…
Reference in New Issue