[Lldb-commits] [lldb] [lldb] Add SBType::FindNestedType() function (PR #68705)

via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 12 10:33:41 PDT 2023


jimingham wrote:

As long as it does (and will continue doing) what it says, `FindDirectNestedType` is okay.  

Part of me thinks: "later on somebody will want to add an N levels deep search -requiring a depth parameter, and then we'll have to add another `FindNestedTypeAtDepth` API where passing depth of 1 will do exactly the same thing as `FindDirectNestedType`, unnecessarily widening the API surface."  

But adding a depth parameter now to future-proof the API and only supporting 1 (leaving others to fill in the rest of the functionality) also seems a bit weak.

So I end up not having a strong feeling either way, and the functionality is useful.

https://github.com/llvm/llvm-project/pull/68705


More information about the lldb-commits mailing list