Author: Sergei Barannikov Date: 2026-02-19T22:51:19+03:00 New Revision: eec7a2f62046aeb8bd7896777982341b1b617b1c
URL: https://github.com/llvm/llvm-project/commit/eec7a2f62046aeb8bd7896777982341b1b617b1c DIFF: https://github.com/llvm/llvm-project/commit/eec7a2f62046aeb8bd7896777982341b1b617b1c.diff LOG: [lldb] Remove redundant nullptr check (NFC) (#182352) `target` cannot be null because `target_sp` is non-null. Added: Modified: lldb/source/Target/RegisterContext.cpp Removed: ################################################################################ diff --git a/lldb/source/Target/RegisterContext.cpp b/lldb/source/Target/RegisterContext.cpp index c4f9c92e89ec0..f2c038f787961 100644 --- a/lldb/source/Target/RegisterContext.cpp +++ b/lldb/source/Target/RegisterContext.cpp @@ -98,12 +98,8 @@ uint64_t RegisterContext::GetPC(uint64_t fail_value) { uint64_t pc = ReadRegisterAsUnsigned(reg, fail_value); if (pc != fail_value) { - TargetSP target_sp = m_thread.CalculateTarget(); - if (target_sp) { - Target *target = target_sp.get(); - if (target) - pc = target->GetOpcodeLoadAddress(pc, AddressClass::eCode); - } + if (TargetSP target_sp = m_thread.CalculateTarget()) + pc = target_sp->GetOpcodeLoadAddress(pc, AddressClass::eCode); } return pc; _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
