removed senseless ir_sndebugf()
[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 #include "config.h"
11
12 /**
13  * A string formatting routine for ir nodes.
14  * This function rudimentarily implements a kind of printf(3) for ir
15  * nodes. Following conversion specifiers. No length, special or field
16  * width specifiers are accepted.
17  * - %p A pointer.
18  * - %s A string.
19  * - %n A full description of a node.
20  * - %o The opcode name of an ir node.
21  * - %m The mode name of an ir mode.
22  * - %N The node number of an ir node.
23  * - %b The block node number of the nodes block.
24  * - %t A tarval.
25  *
26  * @param fmt The format string.
27  */
28 void ir_printf(const char *fmt, ...);
29
30 /**
31  * @see irn_printf.
32  */
33 void ir_fprintf(FILE *f, const char *fmt, ...);
34
35 /**
36  * @see irn_printf.
37  */
38 void ir_snprintf(char *buf, size_t n, const char *fmt, ...);
39
40 #ifdef DEBUG_libfirm
41
42 #define ir_debugf ir_printf
43 #define ir_fdebugf ir_fprintf
44
45 #else
46
47 static INLINE void ir_debugf(const char *fmt, ...)
48 {
49 }
50
51 static INLINE void ir_fdebugf(FILE *, const char *fmt, ...)
52 {
53 }
54
55
56 #endif
57
58 #endif