Mangled::operator! claimes to be true if the object has an empty mangled and unmangled name, false otherwise, but it was actually true if the object has an empty mangled name. Luckily, this operator doesn't have a lot of users.
The broken logical not operator causes [[ https://llvm.org/PR52702 | PR52702 ]] as https://reviews.llvm.org/D106837 used Mangled::operator! in Symbol::SynthesizeNameIfNeeded. For example, consider the symbol "puts" in a hello world C program:
// Inside Symbol::SynthesizeNameIfNeeded
(lldb) p m_mangled
(lldb_private::Mangled) $0 = (m_mangled = None, m_demangled = "puts")
(lldb) p !m_mangled
(bool) $1 = true # should be false!!
This leads to Symbol::SynthesizeNameIfNeeded overwriting m_demangled part of Mangled (in this case "puts").
In conclusion, this patch turns
`callq 0x401030 ; symbol stub for: ___lldb_unnamed_symbol36`
`callq 0x401030 ; symbol stub for: puts` .