X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftype.c;h=5aac7dfb6e0f7ebc4c1d0f3f3383320bf486ffde;hb=f3b034366a1be7a8ee7f743d673b0343af79772c;hp=a60b96cb499938b94203609aee84facba5911f0e;hpb=0decb677fb069c9d47f5285f12fdb983dca7fdae;p=libfirm diff --git a/ir/tr/type.c b/ir/tr/type.c index a60b96cb4..5aac7dfb6 100644 --- a/ir/tr/type.c +++ b/ir/tr/type.c @@ -1,25 +1,32 @@ /* - * Project: libFIRM - * File name: ir/tr/type.c - * Purpose: Representation of types. - * Author: Goetz Lindenmaier - * Modified by: Michael Beck - * Created: - * CVS-ID: $Id$ - * Copyright: (c) 2001-2006 Universität Karlsruhe - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. + * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * + * This file is part of libFirm. + * + * This file may be distributed and/or modified under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation and appearing in the file LICENSE.GPL included in the + * packaging of this file. + * + * Licensees holding valid libFirm Professional Edition licenses may use + * this file in accordance with the libFirm Commercial License. + * Agreement provided with the Software. + * + * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE + * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE. */ /** - * - * @file type.c + * @file type.c + * @brief Representation of types. + * @author Goetz Lindenmaier, Michael Beck + * @version $Id$ + * @summary * * Implementation of the datastructure to hold * type information. * - * (C) 2001-2006 by Universitaet Karlsruhe - * Goetz Lindenmaier, Michael Beck - * * This module supplies a datastructure to represent all types * known in the compiled program. This includes types specified * in the program as well as types defined by the language. In the @@ -42,12 +49,6 @@ # include "config.h" #endif -#ifdef HAVE_ALLOCA_H -#include -#endif -#ifdef HAVE_MALLOC_H -#include -#endif #ifdef HAVE_STRING_H # include #endif @@ -435,12 +436,14 @@ set_type_state(ir_type *tp, type_state state) { Assure that only innermost dimension is dynamic? */ break; case tpo_enumeration: +#ifndef NDEBUG assert(get_type_mode != NULL); for (i = get_enumeration_n_enums(tp) - 1; i >= 0; --i) { ir_enum_const *ec = get_enumeration_const(tp, i); tarval *tv = get_enumeration_value(ec); assert(tv != NULL && tv != tarval_bad); } +#endif break; default: break; } /* switch (tp) */ @@ -2033,6 +2036,7 @@ ir_entity *frame_alloc_area(ir_type *frame_type, int size, int alignment, int at assert(is_frame_type(frame_type)); assert(get_type_state(frame_type) == layout_fixed); + assert(get_type_alignment_bytes(frame_type) > 0); if (! a_byte) a_byte = new_type_primitive(new_id_from_chars("byte", 4), mode_Bu);