[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

via lldb-commits lldb-commits at lists.llvm.org
Mon May 5 10:05:43 PDT 2025


jimingham wrote:

> One thing I'm not sure about here: will converting array type to a pointer, adding the index and then dereferencing work for Swift? I tried just doing `base->GetChildAtIndex(index)`, but it doesn't work when the base is a pointer and it also returns an error when index is out of bounds, which shouldn't happen with C++.

Swift doesn't have pointers really.  It does pass some things by value (called structs) and others by reference (called classes), but it doesn't let you know how.  So this ambiguity between "pointer to object" and "pointer to contiguous buffer of objects" doesn't come up.

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


More information about the lldb-commits mailing list