buildtools/gcc/isl/print_yaml_field_templ.c
Fredrik Holmqvist c8db99d323 Redo Update to ISL 0.22.1
GCC had a horrible .gitignore, untracked files were not applied
2020-07-22 10:07:48 +02:00

23 lines
619 B
C

#define xCAT(A,B) A ## B
#define CAT(A,B) xCAT(A,B)
#undef TYPE
#define TYPE CAT(isl_,BASE)
#define xFN(TYPE,NAME) TYPE ## _ ## NAME
#define FN(TYPE,NAME) xFN(TYPE,NAME)
/* Print a key-value pair of a YAML mapping to "p",
* with key "name" and value "val".
*/
static __isl_give isl_printer *FN(print_yaml_field,BASE)(
__isl_take isl_printer *p, const char *name, __isl_keep TYPE *val)
{
p = isl_printer_print_str(p, name);
p = isl_printer_yaml_next(p);
p = isl_printer_print_str(p, "\"");
p = FN(isl_printer_print,BASE)(p, val);
p = isl_printer_print_str(p, "\"");
p = isl_printer_yaml_next(p);
return p;
}