llvm/polly/lib/External/isl/isl_printer.c

#include <string.h>
#include <isl_int.h>
#include <isl/id.h>
#include <isl/id_to_id.h>
#include <isl_printer_private.h>

static __isl_give isl_printer *file_start_line(__isl_take isl_printer *p)
{}

static __isl_give isl_printer *file_end_line(__isl_take isl_printer *p)
{}

static __isl_give isl_printer *file_flush(__isl_take isl_printer *p)
{}

static __isl_give isl_printer *file_print_str(__isl_take isl_printer *p,
	const char *s)
{}

static __isl_give isl_printer *file_print_double(__isl_take isl_printer *p,
	double d)
{}

static __isl_give isl_printer *file_print_int(__isl_take isl_printer *p, int i)
{}

static __isl_give isl_printer *file_print_isl_int(__isl_take isl_printer *p, isl_int i)
{}

static int grow_buf(__isl_keep isl_printer *p, int extra)
{}

static __isl_give isl_printer *str_print(__isl_take isl_printer *p,
	const char *s, int len)
{}

static __isl_give isl_printer *str_print_indent(__isl_take isl_printer *p,
	int indent)
{}

static __isl_give isl_printer *str_start_line(__isl_take isl_printer *p)
{}

static __isl_give isl_printer *str_end_line(__isl_take isl_printer *p)
{}

static __isl_give isl_printer *str_flush(__isl_take isl_printer *p)
{}

static __isl_give isl_printer *str_print_str(__isl_take isl_printer *p,
	const char *s)
{}

static __isl_give isl_printer *str_print_double(__isl_take isl_printer *p,
	double d)
{}

static __isl_give isl_printer *str_print_int(__isl_take isl_printer *p, int i)
{}

static __isl_give isl_printer *str_print_isl_int(__isl_take isl_printer *p,
	isl_int i)
{}

struct isl_printer_ops {};

static struct isl_printer_ops file_ops =;

static struct isl_printer_ops str_ops =;

__isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file)
{}

__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx)
{}

__isl_null isl_printer *isl_printer_free(__isl_take isl_printer *p)
{}

isl_ctx *isl_printer_get_ctx(__isl_keep isl_printer *printer)
{}

FILE *isl_printer_get_file(__isl_keep isl_printer *printer)
{}

__isl_give isl_printer *isl_printer_set_isl_int_width(__isl_take isl_printer *p,
	int width)
{}

__isl_give isl_printer *isl_printer_set_indent(__isl_take isl_printer *p,
	int indent)
{}

__isl_give isl_printer *isl_printer_indent(__isl_take isl_printer *p,
	int indent)
{}

/* Replace the indent prefix of "p" by "prefix".
 */
__isl_give isl_printer *isl_printer_set_indent_prefix(__isl_take isl_printer *p,
	const char *prefix)
{}

__isl_give isl_printer *isl_printer_set_prefix(__isl_take isl_printer *p,
	const char *prefix)
{}

__isl_give isl_printer *isl_printer_set_suffix(__isl_take isl_printer *p,
	const char *suffix)
{}

__isl_give isl_printer *isl_printer_set_output_format(__isl_take isl_printer *p,
	int output_format)
{}

int isl_printer_get_output_format(__isl_keep isl_printer *p)
{}

/* Does "p" have a note with identifier "id"?
 */
isl_bool isl_printer_has_note(__isl_keep isl_printer *p,
	__isl_keep isl_id *id)
{}

/* Retrieve the note identified by "id" from "p".
 * The note is assumed to exist.
 */
__isl_give isl_id *isl_printer_get_note(__isl_keep isl_printer *p,
	__isl_take isl_id *id)
{}

/* Associate "note" to the identifier "id" in "p",
 * replacing the previous note associated to the identifier, if any.
 */
__isl_give isl_printer *isl_printer_set_note(__isl_take isl_printer *p,
	__isl_take isl_id *id, __isl_take isl_id *note)
{}

/* Keep track of whether the printing to "p" is being performed from
 * an isl_*_dump function as specified by "dump".
 */
__isl_give isl_printer *isl_printer_set_dump(__isl_take isl_printer *p,
	int dump)
{}

/* Set the YAML style of "p" to "yaml_style" and return the updated printer.
 */
__isl_give isl_printer *isl_printer_set_yaml_style(__isl_take isl_printer *p,
	int yaml_style)
{}

/* Return the YAML style of "p" or -1 on error.
 */
int isl_printer_get_yaml_style(__isl_keep isl_printer *p)
{}

/* Push "state" onto the stack of currently active YAML elements and
 * return the updated printer.
 */
static __isl_give isl_printer *push_state(__isl_take isl_printer *p,
	enum isl_yaml_state state)
{}

/* Remove the innermost active YAML element from the stack and
 * return the updated printer.
 */
static __isl_give isl_printer *pop_state(__isl_take isl_printer *p)
{}

/* Set the state of the innermost active YAML element to "state" and
 * return the updated printer.
 */
static __isl_give isl_printer *update_state(__isl_take isl_printer *p,
	enum isl_yaml_state state)
{}

/* Return the state of the innermost active YAML element.
 * Return isl_yaml_none if we are not inside any YAML element.
 */
static enum isl_yaml_state current_state(__isl_keep isl_printer *p)
{}

/* If we are printing a YAML document and we are at the start of an element,
 * print whatever is needed before we can print the actual element and
 * keep track of the fact that we are now printing the element.
 * If "eol" is set, then whatever we print is going to be the last
 * thing that gets printed on this line.
 *
 * If we are about the print the first key of a mapping, then nothing
 * extra needs to be printed.  For any other key, however, we need
 * to either move to the next line (in block format) or print a comma
 * (in flow format).
 * Before printing a value in a mapping, we need to print a colon.
 *
 * For sequences, in flow format, we only need to print a comma
 * for each element except the first.
 * In block format, before the first element in the sequence,
 * we move to a new line, print a dash and increase the indentation.
 * Before any other element, we print a dash on a new line,
 * temporarily moving the indentation back.
 */
static __isl_give isl_printer *enter_state(__isl_take isl_printer *p,
	int eol)
{}

__isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p,
	const char *s)
{}

__isl_give isl_printer *isl_printer_print_double(__isl_take isl_printer *p,
	double d)
{}

__isl_give isl_printer *isl_printer_print_int(__isl_take isl_printer *p, int i)
{}

__isl_give isl_printer *isl_printer_print_isl_int(__isl_take isl_printer *p,
	isl_int i)
{}

__isl_give isl_printer *isl_printer_start_line(__isl_take isl_printer *p)
{}

__isl_give isl_printer *isl_printer_end_line(__isl_take isl_printer *p)
{}

/* Return a copy of the string constructed by the string printer "printer".
 */
__isl_give char *isl_printer_get_str(__isl_keep isl_printer *printer)
{}

__isl_give isl_printer *isl_printer_flush(__isl_take isl_printer *p)
{}

/* Start a YAML mapping and push a new state to reflect that we
 * are about to print the first key in a mapping.
 *
 * In flow style, print the opening brace.
 * In block style, move to the next line with an increased indentation,
 * except if this is the outer mapping or if we are inside a sequence
 * (in which case we have already increased the indentation and we want
 * to print the first key on the same line as the dash).
 */
__isl_give isl_printer *isl_printer_yaml_start_mapping(
	__isl_take isl_printer *p)
{}

/* Finish a YAML mapping and pop it from the state stack.
 *
 * In flow style, print the closing brace.
 *
 * In block style, first check if we are still in the
 * isl_yaml_mapping_first_key_start state.  If so, we have not printed
 * anything yet, so print "{}" to indicate an empty mapping.
 * If we increased the indentation in isl_printer_yaml_start_mapping,
 * then decrease it again.
 * If this is the outer mapping then print a newline.
 */
__isl_give isl_printer *isl_printer_yaml_end_mapping(
	__isl_take isl_printer *p)
{}

/* Start a YAML sequence and push a new state to reflect that we
 * are about to print the first element in a sequence.
 *
 * In flow style, print the opening bracket.
 */
__isl_give isl_printer *isl_printer_yaml_start_sequence(
	__isl_take isl_printer *p)
{}

/* Finish a YAML sequence and pop it from the state stack.
 *
 * In flow style, print the closing bracket.
 *
 * In block style, check if we are still in the
 * isl_yaml_sequence_first_start state.  If so, we have not printed
 * anything yet, so print "[]" or " []" to indicate an empty sequence.
 * We print the extra space when we instructed enter_state not
 * to print a space at the end of the line.
 * Otherwise, undo the increase in indentation performed by
 * enter_state when moving away from the isl_yaml_sequence_first_start
 * state.
 * If this is the outer sequence then print a newline.
 */
__isl_give isl_printer *isl_printer_yaml_end_sequence(
	__isl_take isl_printer *p)
{}

/* Mark the fact that the current element is finished and that
 * the next output belongs to the next element.
 * In particular, if we are printing a key, then prepare for
 * printing the subsequent value.  If we are printing a value,
 * prepare for printing the next key.  If we are printing an
 * element in a sequence, prepare for printing the next element.
 */
__isl_give isl_printer *isl_printer_yaml_next(__isl_take isl_printer *p)
{}