removed unused header
[libfirm] / ir / ana2 / pto_debug.c
1 /* -*- c -*- */
2
3 /*
4  * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
5  *
6  * This file is part of libFirm.
7  *
8  * This file may be distributed and/or modified under the terms of the
9  * GNU General Public License version 2 as published by the Free Software
10  * Foundation and appearing in the file LICENSE.GPL included in the
11  * packaging of this file.
12  *
13  * Licensees holding valid libFirm Professional Edition licenses may use
14  * this file in accordance with the libFirm Commercial License.
15  * Agreement provided with the Software.
16  *
17  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
18  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE.
20  */
21
22 /**
23  * @file
24  * @brief     Useful Macros for Debugging
25  * @author    Florian
26  * @date      Sat Nov 13 19:30:21 CET 2004
27  * @version   $Id$
28  */
29 # ifdef HAVE_CONFIG_H
30 #  include "config.h"
31 # endif
32
33 /*
34  pto_debug: Useful Macros for Debugging
35 */
36
37 # include "pto_debug.h"
38 # include "pto_comp.h"
39 # include "gnu_ext.h"
40 # include "qset.h"
41
42 /* # include "xmalloc.h" */
43
44 /* Local Defines: */
45
46 /* Local Data Types: */
47
48 /* Local Variables: */
49 static int dbg_lvl = 0;
50
51 /* Local Prototypes: */
52
53 /* ===================================================
54    Local Implementation:
55    =================================================== */
56
57
58 /* ===================================================
59    Exported Implementation:
60    =================================================== */
61 int get_dbg_lvl ()
62 {
63   return (dbg_lvl);
64 }
65
66 void set_dbg_lvl (int lvl)
67 {
68   /* fprintf (stdout, "%s:%s (): dbg_lvl: %i -> %i\n", */
69 /*            __FILE__, __FUNCTION__, dbg_lvl, lvl); */
70   dbg_lvl = lvl;
71 }
72
73 void pto_print_pto (ir_node *node)
74 {
75   pto_t *pto = get_node_pto (node);
76
77   fprintf (stdout, "pto (%s[%li]) = ", OPNAME (node), OPNUM (node));
78   if (NULL != pto) {
79     qset_print (pto->values, stdout);
80   } else {
81     fprintf (stdout, "NULL");
82   }
83 }
84
85
86 \f
87 /*
88   $Log$
89   Revision 1.5  2005/02/25 16:47:51  liekweg
90   fix GNU stuff
91
92   Revision 1.4  2004/12/20 17:34:35  liekweg
93   fix recursion handling
94
95   Revision 1.3  2004/12/02 16:17:51  beck
96   fixed config.h include
97
98   Revision 1.2  2004/11/24 14:53:56  liekweg
99   Bugfixes
100
101   Revision 1.1  2004/11/18 16:37:34  liekweg
102   rewritten
103
104
105 */