projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79e41cd
)
isl_stream_read_union_map: force result to be a map
author
Sven Verdoolaege
<skimo@kotnet.org>
Mon, 17 Sep 2012 15:13:49 +0000
(17:13 +0200)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Mon, 17 Sep 2012 15:14:47 +0000
(17:14 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_input.c
patch
|
blob
|
history
diff --git
a/isl_input.c
b/isl_input.c
index
afc5277
..
bc10d3a
100644
(file)
--- a/
isl_input.c
+++ b/
isl_input.c
@@
-2044,9
+2044,11
@@
__isl_give isl_union_map *isl_stream_read_union_map(struct isl_stream *s)
obj.type = isl_obj_union_set;
obj.v = isl_union_set_from_set(obj.v);
}
- if (obj.v)
- isl_assert(s->ctx, obj.type == isl_obj_union_map ||
- obj.type == isl_obj_union_set, goto error);
+ if (obj.v && obj.type == isl_obj_union_set &&
+ isl_union_set_is_empty(obj.v))
+ obj.type = isl_obj_union_map;
+ if (obj.v && obj.type != isl_obj_union_map)
+ isl_die(s->ctx, isl_error_invalid, "invalid input", goto error);
return obj.v;
error: