Added copyright headers
[libfirm] / ir / common / firm_common.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/common/firm_common.c
4  * Purpose:     Stuff common to all firm modules.
5  * Author:      Martin Trapp, Christian Schaefer
6  * Modified by: Goetz Lindenmaier
7  * Created:
8  * CVS-ID:      $Id$
9  * Copyright:   (c) 1998-2003 Universität Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12
13 /**
14  * @file firm_common.h
15  *
16  * common firm declarations
17  *
18  * @author Martin Trapp, Christian Schaefer & Goetz Lindenmaier
19  */
20
21 # ifndef _FIRM_COMMON_H_
22 # define _FIRM_COMMON_H_
23
24 #ifndef INLINE
25 #ifdef USE_GCC_INLINE
26 #define INLINE inline
27 #else
28 #define INLINE
29 #endif
30 #endif
31
32 /** a list of firm kinds
33  @@@ not all datatypes are tagged yet. */
34 typedef enum {
35   k_entity,     /**< an entity */
36   k_type,       /**< a type */
37   k_ir_graph,   /**< an ir graph */
38   k_ir_node,    /**< an ir node */
39   k_ir_mode,    /**< an ir mode */
40   k_ir_op,      /**< an ir opcode */
41   k_tarval,     /**< a tarval */
42   k_ir_loop,    /**< a loop */
43   k_ir_compound_graph_path, /**< a compound graph path, see entity.h */
44   k_ir_max      /**< maximum value -- illegal for firm nodes. */
45 } firm_kind;
46
47 /**
48  * Returns the kind of a thing.
49  *
50  * @param firm_thing  pointer representing a firm object
51  */
52 firm_kind get_kind(const void *firm_thing);
53
54 /** Returns the kind of a thing as a string. */
55 const char* print_firm_kind(void *firm_thing);
56
57 # endif /*_FIRM_COMMON_H_ */