becopyilp: Inline struct size_red_t into struct ilp_env_t.
[libfirm] / ir / debug / dbginfo_t.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief      Implements the Firm interface to debug information -- private header.
9  * @author     Goetz Lindenmaier
10  * @date       2001
11  * @brief
12  *  dbginfo: This is a empty implementation of the Firm interface to
13  *  debugging support.  It only guarantees that the Firm library compiles
14  *  and runs without any real debugging support.
15  */
16 #ifndef FIRM_DEBUG_DBGINFO_T_H
17 #define FIRM_DEBUG_DBGINFO_T_H
18
19 #include <stdlib.h>
20 #include "dbginfo.h"
21
22 /**
23  * The default merge_pair_func implementation, simply copies the debug info
24  * from the old Firm node to the new one if the new one does not have debug info yet.
25  *
26  * @param nw    The new Firm node.
27  * @param old   The old Firm node.
28  * @param info  The action that cause old node to be replaced by new one.
29  */
30 void default_dbg_info_merge_pair(ir_node *nw, ir_node *old, dbg_action info);
31
32 /**
33  * The default merge_sets_func implementation.  If n_old_nodes is equal 1,
34  * copies the debug info from the old node to all new ones (if they do not have
35  * one), else does nothing.
36  *
37  * @param new_nodes     An array of new Firm nodes.
38  * @param n_new_nodes   The length of the new_nodes array.
39  * @param old_nodes     An array of old (replaced) Firm nodes.
40  * @param n_old_nodes   The length of the old_nodes array.
41  * @param info          The action that cause old node to be replaced by new one.
42  */
43 void default_dbg_info_merge_sets(ir_node **new_nodes, int n_new_nodes,
44                             ir_node **old_nodes, int n_old_nodes,
45                             dbg_action info);
46
47 /**
48  * The current merge_pair_func(), access only from inside firm.
49  */
50 extern merge_pair_func *__dbg_info_merge_pair;
51
52 /**
53  * The current merge_sets_func(), access only from inside firm.
54  */
55 extern merge_sets_func *__dbg_info_merge_sets;
56
57 void ir_dbg_info_snprint(char *buf, size_t buf_size, const dbg_info *dbg);
58
59 #endif