File: check_single_reference_templ.c

package info (click to toggle)
isl 0.27-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,476 kB
  • sloc: ansic: 230,339; python: 19,348; cpp: 7,165; sh: 4,701; makefile: 767; lisp: 207; perl: 9
file content (19 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
#define FN(TYPE,NAME) xFN(TYPE,NAME)

/* Check that "obj" has a single reference.
 * That is, check that "obj" can be changed inplace.
 */
isl_stat FN(TYPE,check_single_reference)(__isl_keep TYPE *obj)
{
	isl_bool single;

	single = FN(TYPE,has_single_reference)(obj);
	if (single < 0)
		return isl_stat_error;
	if (!single)
		isl_die(FN(TYPE,get_ctx)(obj), isl_error_invalid,
			"object should have a single reference",
			return isl_stat_error);
	return isl_stat_ok;
}