Removed separation of nodes and sons in ir_loop
[libfirm] / ir / tr / trvrfy.h
1
2
3 #ifndef TRVRFY_H
4 #define TRVRFY_H
5
6 /**
7  * @file trvrfy.h
8  *
9  * Methods to verify the type representations.
10  *
11  * @author Goetz Lindenmaier
12  *
13  * Methods to verify the type representations.
14  * Copyright 2003 University of Karlsruhe.
15  * Created 29.1.2003.
16  *
17  * $Id$
18  */
19
20 #include "firm.h"
21 #include "xprintf.h"
22
23 /**
24  * possible trvrfy() error codes
25  */
26 enum  trvrfy_error_codes {
27   no_error                 = 0,         /**< no error */
28   error_ent_not_cont       = 1,         /**< overwritten entity not in superclass */
29   error_null_mem           = 2,         /**< compound contains NULL member */
30   error_const_on_wrong_irg = 3,         /**< constant placed on wrong IRG */
31 };
32
33
34 /**
35  * Walks the type information and performs a set of sanity checks.
36  *
37  * Currently, the following checks are executed:
38  * - values of initialized entities must be allocated on the constant IRG
39  * - class types: doesn't have NULL members
40  * - class types: all overwrites are existant in the super type
41  *
42  * @return
43  *    0 if graph is correct
44  *    else error code.
45  */
46 int tr_vrfy(void);
47
48 /**
49  * If NDEBUG is defined performs nothing, else calles the tr_vrfy() function.
50  */
51 #ifdef NDEBUG
52 #define TR_VRFY()       0
53 #else
54 #define TR_VRFY()       tr_vrfy()
55 #endif
56
57 #endif /* TRVRFY_H */