2 * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
4 * This file is part of libFirm.
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.
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.
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
22 * @brief common firm declarations
23 * @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier
26 #ifndef FIRM_COMMON_FIRM_COMMON_H
27 #define FIRM_COMMON_FIRM_COMMON_H
29 /** a list of firm kinds
30 @@@ not all datatypes are tagged yet. */
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. */
49 * Returns the kind of a thing.
51 * @param firm_thing pointer representing a firm object
53 firm_kind get_kind(const void *firm_thing);
55 /** Returns the kind of a thing as a string. */
56 const char *print_firm_kind(void *firm_thing);
58 /** Print an identification of a firm thing. */
59 void firm_identify_thing(void *X);