00001 /* Tree-dumping functionality for C-family languages. 00002 Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. 00003 Written by Mark Mitchell <mark@codesourcery.com> 00004 00005 This file is part of GCC. 00006 00007 GCC is free software; you can redistribute it and/or modify it under 00008 the terms of the GNU General Public License as published by the Free 00009 Software Foundation; either version 2, or (at your option) any later 00010 version. 00011 00012 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 00013 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with GCC; see the file COPYING. If not, write to the Free 00019 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 00020 02110-1301, USA. */ 00021 00022 #include "config.h" 00023 #include "system.h" 00024 #include "coretypes.h" 00025 #include "tm.h" 00026 #include "tree.h" 00027 #include "c-tree.h" 00028 #include "tree-dump.h" 00029 00030 /* Dump information common to statements from STMT. */ 00031 00032 void 00033 dump_stmt (dump_info_p di, tree t) 00034 { 00035 if (EXPR_HAS_LOCATION (t)) 00036 dump_int (di, "line", EXPR_LINENO (t)); 00037 } 00038 00039 /* Dump any C-specific tree codes and attributes of common codes. */ 00040 00041 bool 00042 c_dump_tree (void *dump_info, tree t) 00043 { 00044 enum tree_code code; 00045 dump_info_p di = (dump_info_p) dump_info; 00046 00047 /* Figure out what kind of node this is. */ 00048 code = TREE_CODE (t); 00049 00050 switch (code) 00051 { 00052 case FIELD_DECL: 00053 if (DECL_C_BIT_FIELD (t)) 00054 dump_string (di, "bitfield"); 00055 break; 00056 00057 default: 00058 break; 00059 } 00060 00061 return false; 00062 }
1.5.6