extract out isl/ast_type.h
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 3 Jul 2013 11:06:13 +0000 (3 13:06 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 27 Jul 2013 09:04:01 +0000 (27 11:04 +0200)
This is needed to avoid a circular dependence in the definition of
isl_ast_expr_substitute_ids in the next commit.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Makefile.am
include/isl/ast.h
include/isl/ast_type.h [new file with mode: 0644]

index 96b09ee..b72c835 100644 (file)
@@ -198,6 +198,7 @@ pkginclude_HEADERS = \
        include/isl/aff_type.h \
        include/isl/arg.h \
        include/isl/ast.h \
+       include/isl/ast_type.h \
        include/isl/ast_build.h \
        include/isl/band.h \
        include/isl/constraint.h \
index fa5d7b3..bebb2eb 100644 (file)
@@ -2,6 +2,7 @@
 #define ISL_AST_H
 
 #include <isl/ctx.h>
+#include <isl/ast_type.h>
 #include <isl/id.h>
 #include <isl/val.h>
 #include <isl/list.h>
 extern "C" {
 #endif
 
-struct isl_ast_expr;
-typedef struct isl_ast_expr isl_ast_expr;
-
-struct isl_ast_node;
-typedef struct isl_ast_node isl_ast_node;
-
-enum isl_ast_op_type {
-       isl_ast_op_error = -1,
-       isl_ast_op_and,
-       isl_ast_op_and_then,
-       isl_ast_op_or,
-       isl_ast_op_or_else,
-       isl_ast_op_max,
-       isl_ast_op_min,
-       isl_ast_op_minus,
-       isl_ast_op_add,
-       isl_ast_op_sub,
-       isl_ast_op_mul,
-       isl_ast_op_div,
-       isl_ast_op_fdiv_q,      /* Round towards -infty */
-       isl_ast_op_pdiv_q,      /* Dividend is non-negative */
-       isl_ast_op_pdiv_r,      /* Dividend is non-negative */
-       isl_ast_op_cond,
-       isl_ast_op_select,
-       isl_ast_op_eq,
-       isl_ast_op_le,
-       isl_ast_op_lt,
-       isl_ast_op_ge,
-       isl_ast_op_gt,
-       isl_ast_op_call,
-       isl_ast_op_access
-};
-
-enum isl_ast_expr_type {
-       isl_ast_expr_error = -1,
-       isl_ast_expr_op,
-       isl_ast_expr_id,
-       isl_ast_expr_int
-};
-
-enum isl_ast_node_type {
-       isl_ast_node_error = -1,
-       isl_ast_node_for = 1,
-       isl_ast_node_if,
-       isl_ast_node_block,
-       isl_ast_node_user
-};
-
-struct isl_ast_print_options;
-typedef struct isl_ast_print_options isl_ast_print_options;
-
-ISL_DECLARE_LIST(ast_expr)
-ISL_DECLARE_LIST(ast_node)
-
 int isl_options_set_ast_iterator_type(isl_ctx *ctx, const char *val);
 const char *isl_options_get_ast_iterator_type(isl_ctx *ctx);
 
diff --git a/include/isl/ast_type.h b/include/isl/ast_type.h
new file mode 100644 (file)
index 0000000..4726288
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef ISL_AST_TYPE_H
+#define ISL_AST_TYPE_H
+
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+struct isl_ast_expr;
+typedef struct isl_ast_expr isl_ast_expr;
+
+struct isl_ast_node;
+typedef struct isl_ast_node isl_ast_node;
+
+enum isl_ast_op_type {
+       isl_ast_op_error = -1,
+       isl_ast_op_and,
+       isl_ast_op_and_then,
+       isl_ast_op_or,
+       isl_ast_op_or_else,
+       isl_ast_op_max,
+       isl_ast_op_min,
+       isl_ast_op_minus,
+       isl_ast_op_add,
+       isl_ast_op_sub,
+       isl_ast_op_mul,
+       isl_ast_op_div,
+       isl_ast_op_fdiv_q,      /* Round towards -infty */
+       isl_ast_op_pdiv_q,      /* Dividend is non-negative */
+       isl_ast_op_pdiv_r,      /* Dividend is non-negative */
+       isl_ast_op_cond,
+       isl_ast_op_select,
+       isl_ast_op_eq,
+       isl_ast_op_le,
+       isl_ast_op_lt,
+       isl_ast_op_ge,
+       isl_ast_op_gt,
+       isl_ast_op_call,
+       isl_ast_op_access
+};
+
+enum isl_ast_expr_type {
+       isl_ast_expr_error = -1,
+       isl_ast_expr_op,
+       isl_ast_expr_id,
+       isl_ast_expr_int
+};
+
+enum isl_ast_node_type {
+       isl_ast_node_error = -1,
+       isl_ast_node_for = 1,
+       isl_ast_node_if,
+       isl_ast_node_block,
+       isl_ast_node_user
+};
+
+struct isl_ast_print_options;
+typedef struct isl_ast_print_options isl_ast_print_options;
+
+ISL_DECLARE_LIST(ast_expr)
+ISL_DECLARE_LIST(ast_node)
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif