Skip to content

[lldb] Remove redundant calls to std::unique_ptr<T>::get (NFC) (NFC) #140440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lldb/source/Target/RegisterContextUnwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() ||
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() ||
Expand Down
Loading