diff --git a/lldb/source/Target/ThreadPlanStack.cpp b/lldb/source/Target/ThreadPlanStack.cpp --- a/lldb/source/Target/ThreadPlanStack.cpp +++ b/lldb/source/Target/ThreadPlanStack.cpp @@ -142,20 +142,20 @@ lldb::ThreadPlanSP ThreadPlanStack::PopPlan() { assert(m_plans.size() > 1 && "Can't pop the base thread plan"); - lldb::ThreadPlanSP plan_sp = std::move(m_plans.back()); + lldb::ThreadPlanSP plan_sp = m_plans.back(); + m_plans.pop_back(); m_completed_plans.push_back(plan_sp); plan_sp->WillPop(); - m_plans.pop_back(); return plan_sp; } lldb::ThreadPlanSP ThreadPlanStack::DiscardPlan() { assert(m_plans.size() > 1 && "Can't discard the base thread plan"); - lldb::ThreadPlanSP plan_sp = std::move(m_plans.back()); + lldb::ThreadPlanSP plan_sp = m_plans.back(); + m_plans.pop_back(); m_discarded_plans.push_back(plan_sp); plan_sp->WillPop(); - m_plans.pop_back(); return plan_sp; }