In LLDB we currently rely on hand-parsing demangled function
prototypes when selecting a candidate symbol for expression evaluation.
We now plan to use the Itanium mangle tree API to compare function
encodings instead.
This patch adds the ability to compare nodes of the Itanium mangle tree.
Testing
- Added unit-tests for each Node's new operator==
I think I don't understand why there is both operator== and equals. Do we really need both?
Instead, you could consider defining a virtual bool equals(Node const* Root) const = 0; and override it in subclasses, which seems to be a bit more in-line with what's done elsewhere in this file (e.g. printRight). Thoughts? It does mean that all overrides are going to have to check that Root->Kind == this->Kind, but that may be acceptable.