c-dump.c 1.29 KB
Newer Older
Jason Merrill committed
1
/* Tree-dumping functionality for C-family languages.
2
   Copyright (C) 2002-2020 Free Software Foundation, Inc.
Jason Merrill committed
3 4 5 6 7 8
   Written by Mark Mitchell <mark@codesourcery.com>

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
9
Software Foundation; either version 3, or (at your option) any later
Jason Merrill committed
10 11 12 13 14 15 16 17
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
18 19
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */
Jason Merrill committed
20 21 22

#include "config.h"
#include "system.h"
23
#include "coretypes.h"
24
#include "c-common.h"
25
#include "tree-dump.h"
Jason Merrill committed
26 27 28

/* Dump any C-specific tree codes and attributes of common codes.  */

29
bool
30
c_dump_tree (void *dump_info, tree t)
Jason Merrill committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
{
  enum tree_code code;
  dump_info_p di = (dump_info_p) dump_info;

  /* Figure out what kind of node this is.  */
  code = TREE_CODE (t);

  switch (code)
    {
    case FIELD_DECL:
      if (DECL_C_BIT_FIELD (t))
	dump_string (di, "bitfield");
      break;

    default:
      break;
    }

49
  return false;
Jason Merrill committed
50
}