summaryrefslogtreecommitdiff
path: root/polly/lib/External/isl/isl_id.c
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/External/isl/isl_id.c')
-rw-r--r--polly/lib/External/isl/isl_id.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/polly/lib/External/isl/isl_id.c b/polly/lib/External/isl/isl_id.c
index ab0f75b3693c..d1f575e2461f 100644
--- a/polly/lib/External/isl/isl_id.c
+++ b/polly/lib/External/isl/isl_id.c
@@ -191,6 +191,16 @@ __isl_give isl_id *isl_id_set_free_user(__isl_take isl_id *id,
return id;
}
+/* Retrieve the callback set by isl_id_set_free_user,
+ * or NULL if no such callback was set.
+ */
+void (*isl_id_get_free_user(__isl_keep isl_id *id))(void *user)
+{
+ if (!id)
+ return NULL;
+ return id->free_user;
+}
+
/* If the id has a negative refcount, then it is a static isl_id
* and should not be freed.
*/
@@ -273,18 +283,9 @@ __isl_give isl_id *isl_stream_read_id(__isl_keep isl_stream *s)
return id;
}
-/* Read an isl_id object from the string "str".
- */
-__isl_give isl_id *isl_id_read_from_str(isl_ctx *ctx, const char *str)
-{
- isl_id *id;
- isl_stream *s = isl_stream_new_str(ctx, str);
- if (!s)
- return NULL;
- id = isl_stream_read_id(s);
- isl_stream_free(s);
- return id;
-}
+#undef TYPE_BASE
+#define TYPE_BASE id
+#include "isl_read_from_str_templ.c"
/* Is "id1" (obviously) equal to "id2"?
*