aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>2023-07-14 15:59:24 -0400
committerFelipe de Azevedo Piovezan <fpiovezan@apple.com>2023-07-19 17:11:21 -0400
commit8b19d13fde6e32c8815f3f4e3f629208b0f1d0e9 (patch)
tree30ec516dd6c3a23cc6df1630015a2aad226c659a /clang/lib/CodeGen/CodeGenFunction.cpp
parent1d1f245270ffb739191023cd990ba6d7780026ee (diff)
downloadllvm-8b19d13fde6e32c8815f3f4e3f629208b0f1d0e9.zip
llvm-8b19d13fde6e32c8815f3f4e3f629208b0f1d0e9.tar.gz
llvm-8b19d13fde6e32c8815f3f4e3f629208b0f1d0e9.tar.bz2
[lldb] Make frame var --regex always search globals
Currently frame var --regex sometimes searches globals, sometimes it doesn't. This happens because `StackFrame::GetVariableList` always returns the biggest list it has, regardless of whether only globals were requested or not. In other words, if a previous call to `GetVariableList` requested globals, all subsequent calls will see them. The implication here is that users of `StackFrame::GetVariableList` are expected to filter the results of this function. This is what we do for a vanilla `frame var` command. But it is not what we do when `--regex` is used. This commit solves the issue by: 1. Making `--regex` imply `--globals`. This matches the behavior of `frame var <some_name>`, which will also search the global scope. 2. Making the `--regex` search respect the command object options. See the added test for an example of the oddities this patch addresses. Without the patch, the test fails. However it could be made to pass by calling a plain `frame var` before calling `frame var --regex A::`. Differential Revision: https://reviews.llvm.org/D155334
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions