Remove the unused flag irop_flag_always_opt.
[libfirm] / ir / ir / irprintf.c
1 /*
2  * Copyright (C) 1995-2008 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 helper unterstanding firm types
23  * @author  Sebastian Hack
24  * @date    29.11.2004
25  */
26 #include "config.h"
27
28 #include <string.h>
29
30 #include <stdlib.h>
31 #include <stdio.h>
32 #include <stdarg.h>
33
34 #include <ctype.h>
35
36 #include "ident.h"
37 #include "irmode_t.h"
38 #include "irnode_t.h"
39 #include "entity_t.h"
40 #include "type_t.h"
41 #include "tv_t.h"
42 #include "irprintf.h"
43 #include "obst.h"
44 #include "pset.h"
45 #include "iterator.h"
46 #include "bitset.h"
47 #include "dbginfo_t.h"
48 #include "irargs_t.h"
49
50 void ir_printf(const char *fmt, ...)
51 {
52         va_list args;
53
54         va_start(args, fmt);
55         lc_evprintf(firm_get_arg_env(), fmt, args);
56         va_end(args);
57 }
58
59 void ir_fprintf(FILE *f, const char *fmt, ...)
60 {
61         va_list args;
62
63         va_start(args, fmt);
64         lc_evfprintf(firm_get_arg_env(), f, fmt, args);
65         va_end(args);
66 }
67
68 void ir_snprintf(char *buf, size_t n, const char *fmt, ...)
69 {
70         va_list args;
71
72         va_start(args, fmt);
73         lc_evsnprintf(firm_get_arg_env(), buf, n, fmt, args);
74         va_end(args);
75 }
76
77 void ir_vprintf(const char *fmt, va_list args)
78 {
79         lc_evprintf(firm_get_arg_env(), fmt, args);
80 }
81
82 void ir_vfprintf(FILE *f, const char *fmt, va_list args)
83 {
84         lc_evfprintf(firm_get_arg_env(), f, fmt, args);
85 }
86
87 void ir_vsnprintf(char *buf, size_t len, const char *fmt, va_list args)
88 {
89         lc_evsnprintf(firm_get_arg_env(), buf, len, fmt, args);
90 }
91
92 void ir_obst_vprintf(struct obstack *obst, const char *fmt, va_list args)
93 {
94         lc_evoprintf(firm_get_arg_env(), obst, fmt, args);
95 }