__isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *space,
enum isl_dim_type type, unsigned pos,
__isl_keep const char *name);
+ int isl_space_has_dim_name(__isl_keep isl_space *space,
+ enum isl_dim_type type, unsigned pos);
__isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *space,
enum isl_dim_type type, unsigned pos);
int isl_space_find_dim_by_name(__isl_keep isl_space *space,
enum isl_dim_type type, const char *name);
+int isl_space_has_dim_name(__isl_keep isl_space *space,
+ enum isl_dim_type type, unsigned pos);
__isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *dim,
enum isl_dim_type type, unsigned pos,
__isl_keep const char *name);
return NULL;
}
+/* Does the given dimension have a name?
+ */
+int isl_space_has_dim_name(__isl_keep isl_space *space,
+ enum isl_dim_type type, unsigned pos)
+{
+ isl_id *id;
+
+ if (!space)
+ return -1;
+ id = get_id(space, type, pos);
+ return id && id->name;
+}
+
__isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *dim,
enum isl_dim_type type, unsigned pos)
{