File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -80,9 +80,7 @@ void ControlFlowBuilder::operator()(Switch const& _switch)
8080void ControlFlowBuilder::operator ()(FunctionDefinition const & _function)
8181{
8282 ScopedSaveAndRestore currentNode (m_currentNode, nullptr );
83- ScopedSaveAndRestore leaveNode (m_leave, nullptr );
84- ScopedSaveAndRestore breakNode (m_break, nullptr );
85- ScopedSaveAndRestore continueNode (m_continue, nullptr );
83+ yulAssert (!m_leave && !m_break && !m_continue, " Function hoister has not been used." );
8684
8785 FunctionFlow flow;
8886 flow.exit = newNode ();
@@ -95,6 +93,8 @@ void ControlFlowBuilder::operator()(FunctionDefinition const& _function)
9593 m_currentNode->successors .emplace_back (flow.exit );
9694
9795 m_functionFlows[_function.name ] = move (flow);
96+
97+ m_leave = nullptr ;
9898}
9999
100100void ControlFlowBuilder::operator ()(ForLoop const & _for)
You can’t perform that action at this time.
0 commit comments