e471629d611e630121ce916241dbb1247c26bae8
[libfirm] / ir / ir / irprintf.h
1 /**
2  * A little printf understanding some firm types.
3  * @author Sebastian Hack
4  * @date 29.11.2004
5  */
6
7 #ifndef _IRPRINTF_H
8 #define _IRPRINTF_H
9
10 /**
11  * A string formatting routine for ir nodes.
12  * This function rudimentarily implements a kind of printf(3) for ir
13  * nodes. Following conversion specifiers. No length, special or field
14  * width specifiers are accepted.
15  * - %p A pointer.
16  * - %s A string.
17  * - %N A full description of a node.
18  * - %o The opcode name of an ir node.
19  * - %m The mode name of an ir mode.
20  * - %n The node number of an ir node.
21  * - %b The block node number of the nodes block.
22  * - %t A tarval.
23  *
24  * @param fmt The format string.
25  */
26 void ir_printf(const char *fmt, ...);
27
28 /**
29  * @see irn_printf.
30  */
31 void ir_fprintf(FILE *f, const char *fmt, ...);
32
33 /**
34  * @see irn_printf.
35  */
36 void ir_snprintf(char *buf, size_t n, const char *fmt, ...);
37
38 #endif