[Lldb-commits] [lldb] [lldb][NFC] Create StackID::IsYounger (PR #209402)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 14 02:19:43 PDT 2026
================
@@ -50,6 +50,11 @@ class StackID {
void Dump(Stream *s);
+ /// Returns true if `lhs` corresponds to a frame younger (i.e. higher on the
+ /// call stack) than `rhs`, and false otherwise (including when the frames are
+ /// not comparable).
+ static bool IsYounger(const StackID &lhs, const StackID &rhs);
----------------
DavidSpickett wrote:
What's the reason for this to be static, do we need it for a sorting algorithm?
You could have:
```
bool IsYoungerThan(const StackID &other);
```
If the answer is "there's not much difference and it makes the diff smaller to use a static", then fair enough.
https://github.com/llvm/llvm-project/pull/209402
More information about the lldb-commits
mailing list