removed flexible array and set, use lists in implementation
[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-2007 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 #ifndef _FIRM_COMMON_H_
21 #define _FIRM_COMMON_H_
22
23 /** a list of firm kinds
24  @@@ not all datatypes are tagged yet. */
25 typedef enum {
26         k_BAD = 0,                /**< An invalid firm node. */
27         k_entity,                 /**< An entity. */
28         k_type,                   /**< A type. */
29         k_ir_graph,               /**< An IR graph. */
30         k_ir_node,                /**< An IR node. */
31         k_ir_mode,                /**< An IR mode. */
32         k_ir_op,                  /**< An IR opcode. */
33         k_tarval,                 /**< A tarval. */
34         k_ir_loop,                /**< A loop. */
35         k_ir_compound_graph_path, /**< A compound graph path, see entity.h. */
36         k_ir_extblk,              /**< An extended basic block. */
37         k_ir_prog,                /**< A program representation (irp). */
38         k_ir_region,              /**< A region. */
39         k_ir_max                  /**< maximum value -- illegal for firm nodes. */
40 } firm_kind;
41
42 /**
43  * Returns the kind of a thing.
44  *
45  * @param firm_thing  pointer representing a firm object
46  */
47 firm_kind get_kind(const void *firm_thing);
48
49 /** Returns the kind of a thing as a string. */
50 const char *print_firm_kind(void *firm_thing);
51
52 /** Print an identification of a firm thing. */
53 void firm_identify_thing(void *X);
54
55 #endif /*_FIRM_COMMON_H_ */