isl_printer_print_space: support printing in "omega" format
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 1 Oct 2012 09:18:04 +0000 (1 11:18 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 13 Nov 2012 23:33:53 +0000 (14 00:33 +0100)
In particular, print a declaration for the parameters in the space.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_output.c

index 452a30d..9cbe944 100644 (file)
@@ -1969,8 +1969,8 @@ error:
        return NULL;
 }
 
-__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p,
-       __isl_keep isl_space *dim)
+static __isl_give isl_printer *isl_printer_print_space_isl(
+       __isl_take isl_printer *p, __isl_keep isl_space *dim)
 {
        if (!dim)
                goto error;
@@ -1993,6 +1993,21 @@ error:
        return NULL;
 }
 
+__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p,
+       __isl_keep isl_space *space)
+{
+       if (!p || !space)
+               return isl_printer_free(p);
+       if (p->output_format == ISL_FORMAT_ISL)
+               return isl_printer_print_space_isl(p, space);
+       else if (p->output_format == ISL_FORMAT_OMEGA)
+               return print_omega_parameters(space, p);
+
+       isl_die(isl_space_get_ctx(space), isl_error_unsupported,
+               "output format not supported for space",
+               return isl_printer_free(p));
+}
+
 __isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p,
        __isl_keep isl_local_space *ls)
 {