eliminated compiler wearnings
[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
22 /**
23  * possible trvrfy() error codes
24  */
25 enum  trvrfy_error_codes {
26   no_error                 = 0,         /**< no error */
27   error_ent_not_cont       = 1,         /**< overwritten entity not in superclass */
28   error_null_mem           = 2,         /**< compound contains NULL member */
29   error_const_on_wrong_irg = 3          /**< constant placed on wrong IRG */
30 };
31
32
33 /**
34  * Walks the type information and performs a set of sanity checks.
35  *
36  * Currently, the following checks are executed:
37  * - values of initialized entities must be allocated on the constant IRG
38  * - class types: doesn't have NULL members
39  * - class types: all overwrites are existant in the super type
40  *
41  * @return
42  *    0 if graph is correct
43  *    else error code.
44  */
45 int tr_vrfy(void);
46
47 /**
48  * If NDEBUG is defined performs nothing, else calles the tr_vrfy() function.
49  */
50 #ifdef NDEBUG
51 #define TR_VRFY()       0
52 #else
53 #define TR_VRFY()       tr_vrfy()
54 #endif
55
56 #endif /* TRVRFY_H */