X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fcommon%2Ffirm_common.h;h=c2344fbd05c4f6996a1fb787586e415aef58ffa6;hb=51eff1cc020af2ed56d9ea226fe20faf801cac5b;hp=233efc3dbd4dff47b828bdcb9bb46d1226e03cc2;hpb=de3ad6fcd245b88094f28f89284f2d62d4d50d3c;p=libfirm diff --git a/ir/common/firm_common.h b/ir/common/firm_common.h index 233efc3db..c2344fbd0 100644 --- a/ir/common/firm_common.h +++ b/ir/common/firm_common.h @@ -1,37 +1,55 @@ -/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe -* All rights reserved. -* -* Authors: Martin Trapp, Christian Schaefer & -* Goetz Lindenmaier -* -* firm_common.h: common firm declarations -*/ +/* + * Project: libFIRM + * File name: ir/common/firm_common.c + * Purpose: Stuff common to all firm modules. + * Author: Martin Trapp, Christian Schaefer + * Modified by: Goetz Lindenmaier + * Created: + * CVS-ID: $Id$ + * Copyright: (c) 1998-2003 Universität Karlsruhe + * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + */ -/* $Id$ */ +/** + * @file firm_common.h + * + * common firm declarations + * + * @author Martin Trapp, Christian Schaefer & Goetz Lindenmaier + */ # ifndef _FIRM_COMMON_H_ # define _FIRM_COMMON_H_ -#ifndef INLINE -#ifdef USE_GCC_INLINE -#define INLINE inline -#else -#define INLINE -#endif -#endif - -/* a list of firm kinds */ +/** a list of firm kinds + @@@ not all datatypes are tagged yet. */ typedef enum { - k_entity, - k_type, - k_ir_node, - k_ir_loop + k_BAD = 0, /**< an invalid firm node */ + k_entity, /**< an entity */ + k_type, /**< a type */ + k_ir_graph, /**< an ir graph */ + k_ir_node, /**< an ir node */ + k_ir_mode, /**< an ir mode */ + k_ir_op, /**< an ir opcode */ + k_tarval, /**< a tarval */ + k_ir_loop, /**< a loop */ + k_ir_compound_graph_path, /**< a compound graph path, see entity.h */ + k_ir_extblk, /**< an extended block */ + k_ir_prog, /**< a program representation (irp) */ + k_ir_max /**< maximum value -- illegal for firm nodes. */ } firm_kind; -/* returns the kind of the thing */ -firm_kind get_kind(void *firm_thing); +/** + * Returns the kind of a thing. + * + * @param firm_thing pointer representing a firm object + */ +firm_kind get_kind(const void *firm_thing); -/* returns a string. */ +/** Returns the kind of a thing as a string. */ const char* print_firm_kind(void *firm_thing); +/** Print an identification of a firm thing. */ +void firm_identify_thing(void *X); + # endif /*_FIRM_COMMON_H_ */