1/* GCC core type declarations. 2 Copyright (C) 2002, 2004, 2007, 2008, 2009 Free Software Foundation, Inc. 3 4This file is part of GCC. 5 6GCC is free software; you can redistribute it and/or modify it under 7the terms of the GNU General Public License as published by the Free 8Software Foundation; either version 3, or (at your option) any later 9version. 10 11GCC is distributed in the hope that it will be useful, but WITHOUT ANY 12WARRANTY; without even the implied warranty of MERCHANTABILITY or 13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14for more details. 15 16Under Section 7 of GPL version 3, you are granted additional 17permissions described in the GCC Runtime Library Exception, version 183.1, as published by the Free Software Foundation. 19 20You should have received a copy of the GNU General Public License and 21a copy of the GCC Runtime Library Exception along with this program; 22see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23<http://www.gnu.org/licenses/>. */ 24 25/* Provide forward declarations of core types which are referred to by 26 most of the compiler. This allows header files to use these types 27 (e.g. in function prototypes) without concern for whether the full 28 definitions are visible. Some other declarations that need to be 29 universally visible are here, too. 30 31 In the context of tconfig.h, most of these have special definitions 32 which prevent them from being used except in further type 33 declarations. This is a kludge; the right thing is to avoid 34 including the "tm.h" header set in the context of tconfig.h, but 35 we're not there yet. */ 36 37#ifndef GCC_CORETYPES_H 38#define GCC_CORETYPES_H 39 40#ifndef GTY 41#define GTY(x) /* nothing - marker for gengtype */ 42#endif 43 44#ifndef USED_FOR_TARGET 45 46struct bitmap_head_def; 47typedef struct bitmap_head_def *bitmap; 48typedef const struct bitmap_head_def *const_bitmap; 49struct rtx_def; 50typedef struct rtx_def *rtx; 51typedef const struct rtx_def *const_rtx; 52struct rtvec_def; 53typedef struct rtvec_def *rtvec; 54typedef const struct rtvec_def *const_rtvec; 55union tree_node; 56typedef union tree_node *tree; 57union gimple_statement_d; 58typedef union gimple_statement_d *gimple; 59typedef const union tree_node *const_tree; 60typedef const union gimple_statement_d *const_gimple; 61union section; 62typedef union section section; 63struct cl_target_option; 64struct cl_optimization; 65struct gimple_seq_d; 66typedef struct gimple_seq_d *gimple_seq; 67typedef const struct gimple_seq_d *const_gimple_seq; 68struct gimple_seq_node_d; 69typedef struct gimple_seq_node_d *gimple_seq_node; 70typedef const struct gimple_seq_node_d *const_gimple_seq_node; 71 72/* Address space number for named address space support. */ 73typedef unsigned char addr_space_t; 74 75/* The value of addr_space_t that represents the generic address space. */ 76#define ADDR_SPACE_GENERIC 0 77#define ADDR_SPACE_GENERIC_P(AS) ((AS) == ADDR_SPACE_GENERIC) 78 79/* The major intermediate representations of GCC. */ 80enum ir_type { 81 IR_GIMPLE, 82 IR_RTL_CFGRTL, 83 IR_RTL_CFGLAYOUT 84}; 85 86/* Provide forward struct declaration so that we don't have to include 87 all of cpplib.h whenever a random prototype includes a pointer. 88 Note that the cpp_reader and cpp_token typedefs remain part of 89 cpplib.h. */ 90 91struct cpp_reader; 92struct cpp_token; 93 94/* The thread-local storage model associated with a given VAR_DECL 95 or SYMBOL_REF. This isn't used much, but both trees and RTL refer 96 to it, so it's here. */ 97enum tls_model { 98 TLS_MODEL_NONE, 99 TLS_MODEL_EMULATED, 100 TLS_MODEL_REAL, 101 TLS_MODEL_GLOBAL_DYNAMIC = TLS_MODEL_REAL, 102 TLS_MODEL_LOCAL_DYNAMIC, 103 TLS_MODEL_INITIAL_EXEC, 104 TLS_MODEL_LOCAL_EXEC 105}; 106 107struct edge_def; 108typedef struct edge_def *edge; 109typedef const struct edge_def *const_edge; 110struct basic_block_def; 111typedef struct basic_block_def *basic_block; 112typedef const struct basic_block_def *const_basic_block; 113#else 114 115struct _dont_use_rtx_here_; 116struct _dont_use_rtvec_here_; 117union _dont_use_tree_here_; 118#define rtx struct _dont_use_rtx_here_ * 119#define const_rtx struct _dont_use_rtx_here_ * 120#define rtvec struct _dont_use_rtvec_here * 121#define const_rtvec struct _dont_use_rtvec_here * 122#define tree union _dont_use_tree_here_ * 123#define const_tree union _dont_use_tree_here_ * 124 125#endif 126 127#endif /* coretypes.h */ 128 129