update copyright message
[libfirm] / include / libfirm / firm_common.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief    common firm declarations
23  * @author   Martin Trapp, Christian Schaefer, Goetz Lindenmaier
24  * @version  $Id$
25  */
26 #ifndef FIRM_COMMON_FIRM_COMMON_H
27 #define FIRM_COMMON_FIRM_COMMON_H
28
29 /** a list of firm kinds
30  @@@ not all datatypes are tagged yet. */
31 typedef enum {
32         k_BAD = 0,                /**< An invalid firm node. */
33         k_entity,                 /**< An entity. */
34         k_type,                   /**< A type. */
35         k_ir_graph,               /**< An IR graph. */
36         k_ir_node,                /**< An IR node. */
37         k_ir_mode,                /**< An IR mode. */
38         k_ir_op,                  /**< An IR opcode. */
39         k_tarval,                 /**< A tarval. */
40         k_ir_loop,                /**< A loop. */
41         k_ir_compound_graph_path, /**< A compound graph path, see entity.h. */
42         k_ir_extblk,              /**< An extended basic block. */
43         k_ir_prog,                /**< A program representation (irp). */
44         k_ir_region,              /**< A region. */
45         k_ir_max                  /**< maximum value -- illegal for firm nodes. */
46 } firm_kind;
47
48 /**
49  * Returns the kind of a thing.
50  *
51  * @param firm_thing  pointer representing a firm object
52  */
53 firm_kind get_kind(const void *firm_thing);
54
55 /** Returns the kind of a thing as a string. */
56 const char *print_firm_kind(void *firm_thing);
57
58 /** Print an identification of a firm thing. */
59 void firm_identify_thing(void *X);
60
61 #endif