From 218439fe3bdbf807e18ec64b8b0372a7de23ded4 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 3 Jun 2010 18:36:56 +0200 Subject: [PATCH] isl_basic_map_copy: mark duplicated copy as finalized If an unfinalized copy is needed, the caller will perform an isl_basic_map_cow on the copy. --- isl_map.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/isl_map.c b/isl_map.c index b55ebe8a..d221f21b 100644 --- a/isl_map.c +++ b/isl_map.c @@ -466,7 +466,10 @@ struct isl_basic_map *isl_basic_map_copy(struct isl_basic_map *bmap) bmap->ref++; return bmap; } - return isl_basic_map_dup(bmap); + bmap = isl_basic_map_dup(bmap); + if (bmap) + ISL_F_SET(bmap, ISL_BASIC_SET_FINAL); + return bmap; } struct isl_map *isl_map_copy(struct isl_map *map) -- 2.11.4.GIT