"false" result of the operator can imply not only "the frame is not younger". When CFAs are equal, StackID's operator "<" can only compare symbol contexts of the same function. Otherwise, it also returns false.
In the case I described in D114861, two different frames can have the same CFA, and then the operator's result may be incorrect. "thread step-*" commands get broken in this case.
This patch replaces the operator that can return only boolean value with the function that returns a value of lldb::FrameComparison type. It also updates thread plans to use this function instead of the operator.
It would be easier to read this if the operator== were above CompareTo rather than below it. The first thing this function does is call the == comparator, so it would be nice to have that right next to where it's called.
It's seems a little odd at first to still have the == operator, you'd thing CompareTo should handle everything and then the == should just be lhs.CompareTo(rhs) == eFrameCompareEqual but the CompareTo computation does work that's not needed for ==, so actually that part is fine.