aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2025-05-20 07:44:58 +0200
committerGitHub <noreply@github.com>2025-05-20 07:44:58 +0200
commit6181f4f89d022ebf33ed8a449655347eb1b9b6c0 (patch)
tree8e3028f49a1579657e363f489bee74100737cf45 /flang/lib/Frontend/CompilerInvocation.cpp
parent5c1db3823e0d7ac820c938ca81adbffda3d98219 (diff)
downloadllvm-6181f4f89d022ebf33ed8a449655347eb1b9b6c0.zip
llvm-6181f4f89d022ebf33ed8a449655347eb1b9b6c0.tar.gz
llvm-6181f4f89d022ebf33ed8a449655347eb1b9b6c0.tar.bz2
[lldb] Retcon SBValue::GetChildAtIndex(synthetic=true) (#140065)
The motivation here is being (un)able to treat pointer values as an array consistently. This works for pointers to simple/scalar values, but for aggregates, we get a very surprising result: - GetChildAtIndex(x, ??, true) returns the `x` child of the zeroth array member (the one you get by dereferencing the pointer/array) for all `x` which are smaller than the number of children of that value. - for other values of `x`, we get `v[x]`, where `v` is treated like a (C) pointer This patch reimagines this interface so that the value of `true` always treats (pointer and array) values as pointers. For `false`, we always dereference pointers, while in the case of arrays, we only return the values as far as the array bounds will allow. This has the potential to break existing code, but I have a suspicion that code was already broken to begin with, which is why I think this would be better than introducing a new API and keeping the old (and surprising) behavior. If our own test coverage is any indication, breakage should be minimal.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions