================ @@ -2393,62 +2321,53 @@ lldb::addr_t SBTarget::GetStackRedZoneSize() { bool SBTarget::IsLoaded(const SBModule &module) const { LLDB_INSTRUMENT_VA(this, module); - TargetSP target_sp(GetSP()); - if (!target_sp) - return false; - - ModuleSP module_sp(module.GetSP()); - if (!module_sp) - return false; - - return module_sp->IsLoadedInTarget(target_sp.get()); + if (TargetSP target_sp = GetSP()) { + ModuleSP module_sp(module.GetSP()); + if (module_sp) ---------------- labath wrote:
This is an interesting one, because this pattern comes into conflict with the "early exit" rule. For a small function like this, this is fine, but if it was longer, I'd say that the early exit should win. https://github.com/llvm/llvm-project/pull/141284 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits