[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 10 09:43:06 PDT 2023
jimingham wrote:
The idea seems good. If you are looking for a type and you know it is defined inside another type, then providing a way for you to tell lldb that is useful.
Is FindNestedType guaranteed to have a single return? What if I had:
class A {
class B {
class D {
};
};
class E {
class D {
};
};
};
Then I would expect
```
class_a_type = lldb.target.FindFirstType("A")
class_a_type.FindNestedType("D")
```
to return both A::B::D and A::E::D. So you might need to return a SBTypeList here? You could also add a `FindFirstWhatever` API to return the first hit in case there may be many, though whenever I use that in anything but interactive SB API uses I feel like I probably should be being more careful, so I'm of two minds about that...
https://github.com/llvm/llvm-project/pull/68705
More information about the lldb-commits
mailing list