'Lower the generator\'s finalizer.'

def lower_finalize_func(self, lower):

    fnty = Type.function(Type.void(), [self.context.get_value_type(self.gentype)])
    function = lower.module.get_or_insert_function(fnty, name=self.gendesc.llvm_finalizer_name)
    entry_block = function.append_basic_block('entry')
    builder = Builder(entry_block)
    genptrty = self.context.get_value_type(self.gentype)
    genptr = builder.bitcast(function.args[0], genptrty)
    self.lower_finalize_func_body(builder, genptr)
