Add closure generating for IR builder.