[Lldb-commits] [lldb] [lldb] Use if-with-initializer pattern in SBTarget (NFC) (PR #141284)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Wed May 28 00:18:18 PDT 2025
================
@@ -1606,66 +1559,60 @@ SBSymbolContextList SBTarget::FindCompileUnits(const SBFileSpec &sb_file_spec) {
LLDB_INSTRUMENT_VA(this, sb_file_spec);
SBSymbolContextList sb_sc_list;
- const TargetSP target_sp(GetSP());
- if (target_sp && sb_file_spec.IsValid())
- target_sp->GetImages().FindCompileUnits(*sb_file_spec, *sb_sc_list);
+ if (TargetSP target_sp = GetSP()) {
----------------
labath wrote:
and here
https://github.com/llvm/llvm-project/pull/141284
More information about the lldb-commits
mailing list