forked from OSchip/llvm-project
The plan stack should never be used while empty. GetCurrentPlan is the entry point to contol logic
for the plan stack, so assert here if it gets called with an empty plan stack. <rdar://problem/11265974> llvm-svn: 155078
This commit is contained in:
parent
1f628f4e8f
commit
e1471230e2
|
@ -606,10 +606,11 @@ Thread::DiscardPlan ()
|
|||
ThreadPlan *
|
||||
Thread::GetCurrentPlan ()
|
||||
{
|
||||
if (m_plan_stack.empty())
|
||||
return NULL;
|
||||
else
|
||||
return m_plan_stack.back().get();
|
||||
// There will always be at least the base plan. If somebody is mucking with a
|
||||
// thread with an empty plan stack, we should assert right away.
|
||||
assert (!m_plan_stack.empty());
|
||||
|
||||
return m_plan_stack.back().get();
|
||||
}
|
||||
|
||||
ThreadPlanSP
|
||||
|
|
Loading…
Reference in New Issue