Modify parser and optimizer.

This commit is contained in:
chriseth
2019-05-20 17:32:56 +02:00
parent 46d9df7574
commit 1dc15d5864
20 changed files with 117 additions and 61 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ void DeadCodeEliminator::operator()(Block& _block)
{
TerminationFinder::ControlFlow controlFlowChange;
size_t index;
tie(controlFlowChange, index) = TerminationFinder::firstUnconditionalControlFlowChange(_block.statements);
tie(controlFlowChange, index) = TerminationFinder{m_dialect}.firstUnconditionalControlFlowChange(_block.statements);
// Erase everything after the terminating statement that is not a function definition.
if (controlFlowChange != TerminationFinder::ControlFlow::FlowOut && index != size_t(-1))