Polly
20.0.0git
llvm-project
polly
lib
External
isl
check_reparse_templ.c
Go to the documentation of this file.
1
#define xCAT(A,B) A ## B
2
#define CAT(A,B) xCAT(A,B)
3
#undef TYPE
4
#define TYPE CAT(isl_,BASE)
5
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
6
#define FN(TYPE,NAME) xFN(TYPE,NAME)
7
8
/* Check that printing "obj" and parsing the output results
9
* in the same expression.
10
*/
11
static
isl_stat
FN
(check_reparse,
BASE
)(
isl_ctx
*ctx,
12
__isl_take
TYPE
*
obj
)
13
{
14
char
*
str
;
15
isl_bool
equal
;
16
TYPE
*obj2;
17
18
str
=
FN
(
TYPE
,to_str)(
obj
);
19
obj2 =
FN
(
TYPE
,read_from_str)(ctx,
str
);
20
free(
str
);
21
equal
=
FN
(
TYPE
,plain_is_equal)(
obj
, obj2);
22
FN
(
TYPE
,free)(
obj
);
23
FN
(
TYPE
,free)(obj2);
24
if
(
equal
< 0)
25
return
isl_stat_error
;
26
if
(!
equal
)
27
isl_die
(ctx,
isl_error_unknown
,
28
"parsed function not equal to original"
,
29
return
isl_stat_error
);
30
31
return
isl_stat_ok
;
32
}
TYPE
#define TYPE
Definition:
check_reparse_templ.c:4
FN
#define FN(TYPE, NAME)
Definition:
check_reparse_templ.c:6
__isl_take
#define __isl_take
Definition:
ctx.h:22
isl_stat
isl_stat
Definition:
ctx.h:84
isl_stat_error
@ isl_stat_error
Definition:
ctx.h:85
isl_stat_ok
@ isl_stat_ok
Definition:
ctx.h:86
isl_die
#define isl_die(ctx, errno, msg, code)
Definition:
ctx.h:137
isl_error_unknown
@ isl_error_unknown
Definition:
ctx.h:78
isl_bool
isl_bool
Definition:
ctx.h:89
BASE
#define BASE
Definition:
flow_cmp.c:49
equal
int equal
Definition:
isl_test.c:7868
obj
const char * obj
Definition:
isl_test.c:3316
str
const char * str
Definition:
isl_test.c:2095
isl_ctx
Definition:
isl_ctx_private.h:11
Generated on Mon Jan 20 2025 12:32:01 for Polly by
1.9.6