Previously the compiler would recognize it as unused but couldn't remove
it, leading it to repeat the optimizer endlessly.
var.init_expression = 0;
}
+void ProgramCompiler::NodeRemover::visit(Iteration &iter)
+{
+ if(to_remove.count(iter.init_statement.get()))
+ iter.init_statement = 0;
+}
+
void ProgramCompiler::PrecisionRemover::visit(Precision &)
{
using Visitor::visit;
virtual void visit(ProgramSyntax::Block &);
virtual void visit(ProgramSyntax::VariableDeclaration &);
+ virtual void visit(ProgramSyntax::Iteration &);
};
struct PrecisionRemover: BlockModifier