isl_ast_build_expr_from_set: return valid result on empty set
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 1 May 2014 10:11:27 +0000 (12:11 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 1 May 2014 10:11:27 +0000 (12:11 +0200)
commit631ea8530155d6c8de2160ee7e24060f700364b9
tree96ea3e63b3dc64be473f2290cbcd58ebe67b53f6
parentb4ae615a414b4961b32f75c7510bbcb961e0d8fe
isl_ast_build_expr_from_set: return valid result on empty set

When presented with an empty set, isl_ast_build_expr_from_set would
simply return the value NULL, indicating a failure.
Although there should be no need to call isl_ast_build_expr_from_set
on an empty set, we should not fail silently.
We choose to return a valid expression rather than requiring
a non-empty input.

Although it is currently possible for the isl_ast_build_expr_from_set
to get called on an empty set, the only known test cases that reach
this point only do so due to another bug that will be fixed in the
next commit.  We therefore test the low-level function instead
just in case it ever gets exported.

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