remove symconst_type_tag
[libfirm] / include / libfirm / irprintf.h
1 /*
2  * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief    A little printf understanding some firm types.
23  * @author   Sebastian Hack
24  * @date     29.11.2004
25  */
26 #ifndef FIRM_IR_IRPRINTF_H
27 #define FIRM_IR_IRPRINTF_H
28
29 #include <stddef.h>
30 #include <stdarg.h>
31 #include <stdio.h>
32 #include "begin.h"
33
34 /* forward definition */
35 struct obstack;
36
37 /**
38  * A string formatting routine for ir objects.
39  *
40  * @param fmt  The format string.
41  *
42  * This function rudimentary implements a kind of printf(3) for ir
43  * nodes and adds the following additional conversion specifiers.
44  * - @%t A type name.
45  * - @%e An entity name.
46  * - @%E An entity ld name.
47  * - @%T A tarval.
48  * - @%n A full description of a node.
49  * - @%O The opcode name of an ir node.
50  * - @%N The node number of an ir node.
51  * - @%m The mode name of an ir mode.
52  * - @%B The block node number of the nodes block.
53  * - @%P A compound graph path.
54  * - @%I An ident.
55  * - @%D Print as many white spaces as given in the parameter.
56  * - @%G A debug info (if available) from the given ir node.
57  * - @%B A bitset.
58  * - @%F A Firm object (automatically detected).
59  *
60  * Note that some of the standard format capabilities are not available
61  * due to this new conversion specifiers, use lc_printf() if needed.
62  */
63 FIRM_API void ir_printf(const char *fmt, ...);
64
65 /**
66  * @see ir_printf.
67  */
68 FIRM_API void ir_fprintf(FILE *f, const char *fmt, ...);
69
70 /**
71  * @see ir_printf.
72  */
73 FIRM_API void ir_snprintf(char *buf, size_t n, const char *fmt, ...);
74
75 /**
76  * @see ir_printf.
77  */
78 FIRM_API void ir_vprintf(const char *fmt, va_list args);
79
80 /**
81  * @see ir_printf.
82  */
83 FIRM_API void ir_vfprintf(FILE *f, const char *fmt, va_list args);
84
85 /**
86  * @see ir_printf.
87  */
88 FIRM_API void ir_vsnprintf(char *buf, size_t len, const char *fmt,
89                            va_list args);
90
91 /**
92  * @see ir_printf.
93  */
94 FIRM_API void ir_obst_vprintf(struct obstack *obst, const char *fmt,
95                               va_list args);
96
97 #include "end.h"
98
99 #endif