From 68da710d190291ebd0fe96f8cf69874301442051 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 31 Oct 2011 04:09:27 -0400 Subject: [PATCH] Add missing cow to isl_{basic_,}map_set_dim_name() Signed-off-by: Andreas Kloeckner Signed-off-by: Sven Verdoolaege --- isl_map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/isl_map.c b/isl_map.c index 28356cd..af42750 100644 --- a/isl_map.c +++ b/isl_map.c @@ -492,6 +492,7 @@ __isl_give isl_basic_map *isl_basic_map_set_dim_name( __isl_take isl_basic_map *bmap, enum isl_dim_type type, unsigned pos, const char *s) { + bmap = isl_basic_map_cow(bmap); if (!bmap) return NULL; bmap->dim = isl_space_set_dim_name(bmap->dim, type, pos, s); @@ -508,6 +509,7 @@ __isl_give isl_map *isl_map_set_dim_name(__isl_take isl_map *map, { int i; + map = isl_map_cow(map); if (!map) return NULL; -- 2.7.4