[Lldb-commits] [PATCH] D106171: [lldb] Avoid moving ThreadPlanSP from plans vector
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jul 16 18:37:05 PDT 2021
aprantl added inline comments.
================
Comment at: lldb/source/Target/ThreadPlanStack.cpp:145
- lldb::ThreadPlanSP plan_sp = std::move(m_plans.back());
+ lldb::ThreadPlanSP plan_sp = m_plans.back();
+ m_plans.pop_back();
----------------
Should we comment that we are intentionally making a copy of the SP to avoid a race condition with std::move()?
================
Comment at: lldb/source/Target/ThreadPlanStack.cpp:146
+ lldb::ThreadPlanSP plan_sp = m_plans.back();
+ m_plans.pop_back();
m_completed_plans.push_back(plan_sp);
----------------
It's counterintuitive that WillPop() is being called *after* the value is popped now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106171/new/
https://reviews.llvm.org/D106171
More information about the lldb-commits
mailing list