2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
8 * @brief A little printf understanding some firm types.
9 * @author Sebastian Hack
12 #ifndef FIRM_IR_IRPRINTF_H
13 #define FIRM_IR_IRPRINTF_H
20 /* forward definition */
24 * A string formatting routine for ir objects.
26 * @param fmt The format string.
28 * This function rudimentary implements a kind of printf(3) for ir
29 * nodes and adds the following additional conversion specifiers.
31 * - @%e An entity name.
32 * - @%E An entity ld name.
34 * - @%n A full description of a node.
35 * - @%O The opcode name of an ir node.
36 * - @%N The node number of an ir node.
37 * - @%m The mode name of an ir mode.
38 * - @%B The block node number of the nodes block.
40 * - @%D Print as many white spaces as given in the parameter.
41 * - @%G A debug info (if available) from the given ir node.
43 * - @%F A Firm object (automatically detected).
45 * Note that some of the standard format capabilities are not available
46 * due to this new conversion specifiers, use lc_printf() if needed.
48 FIRM_API void ir_printf(const char *fmt, ...);
53 FIRM_API void ir_fprintf(FILE *f, const char *fmt, ...);
58 FIRM_API void ir_snprintf(char *buf, size_t n, const char *fmt, ...);
63 FIRM_API void ir_vprintf(const char *fmt, va_list args);
68 FIRM_API void ir_vfprintf(FILE *f, const char *fmt, va_list args);
73 FIRM_API void ir_vsnprintf(char *buf, size_t len, const char *fmt,
79 FIRM_API void ir_obst_vprintf(struct obstack *obst, const char *fmt,