[Lldb-commits] [PATCH] D74136: [LLDB] WIP: Follow DW_AT_decl_file when setting breakpoint
Konrad Wilhelm Kleine via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 26 03:13:35 PDT 2020
kwk marked 2 inline comments as done.
kwk added inline comments.
================
Comment at: lldb/source/Breakpoint/BreakpointResolverName.cpp:323
+ // passing.
+ remove_it = false;
+ }
----------------
jankratochvil wrote:
> Now `if (filter_by_function) {}` always overrides any result from `if (filter_by_cu)`. So it would be faster + more clear to read as:
> ```
> if (filter_by_function) {
> if (!sc.function || !filter.FunctionPasses(*sc.function))
> remove_it = true;
> } else if (filter_by_cu) {
> if (!sc.comp_unit || !filter.CompUnitPasses(*sc.comp_unit))
> remove_it = true;
> }
> ```
>
Thanks @jankratochvil ! You were right about the logic. I must have thought to keep as much from the old code and only add to it. But in this case it makes much more sense to structure the logic the way that you've proposed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74136/new/
https://reviews.llvm.org/D74136
More information about the lldb-commits
mailing list