[Lldb-commits] [lldb] a86344c - [lldb] Remove redundant calls to std::unique_ptr<T>::get (NFC) (NFC) (#140440)
via lldb-commits
lldb-commits at lists.llvm.org
Sun May 18 07:36:12 PDT 2025
Author: Kazu Hirata
Date: 2025-05-18T07:36:09-07:00
New Revision: a86344c5a9854ae38d925566d3e9fbc0854254f6
URL: https://github.com/llvm/llvm-project/commit/a86344c5a9854ae38d925566d3e9fbc0854254f6
DIFF: https://github.com/llvm/llvm-project/commit/a86344c5a9854ae38d925566d3e9fbc0854254f6.diff
LOG: [lldb] Remove redundant calls to std::unique_ptr<T>::get (NFC) (NFC) (#140440)
Added:
Modified:
lldb/source/Target/RegisterContextUnwind.cpp
Removed:
################################################################################
diff --git a/lldb/source/Target/RegisterContextUnwind.cpp b/lldb/source/Target/RegisterContextUnwind.cpp
index 2958923a98010..1884d8d53a7f6 100644
--- a/lldb/source/Target/RegisterContextUnwind.cpp
+++ b/lldb/source/Target/RegisterContextUnwind.cpp
@@ -273,7 +273,7 @@ void RegisterContextUnwind::InitializeZerothFrame() {
call_site_unwind_plan = func_unwinders_sp->GetUnwindPlanAtCallSite(
process->GetTarget(), m_thread);
- if (call_site_unwind_plan.get() != nullptr) {
+ if (call_site_unwind_plan != nullptr) {
m_fallback_unwind_plan_sp = call_site_unwind_plan;
if (TryFallbackUnwindPlan())
cfa_status = true;
@@ -1725,10 +1725,10 @@ RegisterContextUnwind::SavedLocationForRegister(
// tricky frame and our usual techniques can continue to be used.
bool RegisterContextUnwind::TryFallbackUnwindPlan() {
- if (m_fallback_unwind_plan_sp.get() == nullptr)
+ if (m_fallback_unwind_plan_sp == nullptr)
return false;
- if (m_full_unwind_plan_sp.get() == nullptr)
+ if (m_full_unwind_plan_sp == nullptr)
return false;
if (m_full_unwind_plan_sp.get() == m_fallback_unwind_plan_sp.get() ||
@@ -1776,7 +1776,7 @@ bool RegisterContextUnwind::TryFallbackUnwindPlan() {
// fallback UnwindPlan. We checked if m_fallback_unwind_plan_sp was nullptr
// at the top -- the only way it became nullptr since then is via
// SavedLocationForRegister().
- if (m_fallback_unwind_plan_sp.get() == nullptr)
+ if (m_fallback_unwind_plan_sp == nullptr)
return true;
// Switch the full UnwindPlan to be the fallback UnwindPlan. If we decide
@@ -1865,10 +1865,10 @@ bool RegisterContextUnwind::TryFallbackUnwindPlan() {
}
bool RegisterContextUnwind::ForceSwitchToFallbackUnwindPlan() {
- if (m_fallback_unwind_plan_sp.get() == nullptr)
+ if (m_fallback_unwind_plan_sp == nullptr)
return false;
- if (m_full_unwind_plan_sp.get() == nullptr)
+ if (m_full_unwind_plan_sp == nullptr)
return false;
if (m_full_unwind_plan_sp.get() == m_fallback_unwind_plan_sp.get() ||
More information about the lldb-commits
mailing list