/*
  Copyright (C) 2000-2010 Silicon Graphics, Inc.  All Rights Reserved.
  Portions Copyright (C) 2009-2012 David Anderson. All Rights Reserved.
  Portions Copyright 2012 SN Systems Ltd. All rights reserved.

  This program is free software; you can redistribute it and/or modify it
  under the terms of version 2.1 of the GNU Lesser General Public License
  as published by the Free Software Foundation.

  This program is distributed in the hope that it would be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  Further, this software is distributed without any warranty that it is
  free of the rightful claim of any third person regarding infringement
  or the like.  Any license provided herein, whether implied or
  otherwise, applies only to this software file.  Patent licenses, if
  any, provided herein do not apply to combinations of this program with
  other software, or any other product whatsoever.

  You should have received a copy of the GNU Lesser General Public
  License along with this program; if not, write the Free Software
  Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307,
  USA.

*/
#include <dwarf.h>

/*
    list for semantic check of tag-tree.

    0xffffffff is a "punctuation."  The final line of this file
    must be 0xffffffff.  The next line after each 0xffffffff
    (except the final line)  stands for "parent-tag."  The lines
    after this line before the next 0xffffffff are the tags that
    can be children of the "parent-tag."

    For example,

    0xffffffff
    DW_TAG_array_type
    DW_TAG_subrange_type
    DW_TAG_enumeration_type
    0xffffffff

    means "only DW_TAG_subrange_type and DW_TAG_enumeration_type can
    be children of DW_TAG_array_type.

    Since DWARF is generally descriptive, not prescriptive,
    this list is at best a current understanding of
    appropriate practice.  Moreover the the dwarf standard
    does not actually list the tag-tag dependencies.
    So mistakes in the list below is certainly possible.
    Corrections and small-ish sample object files
    with unusual or interesting tag tree layouts are welcome.
    Any sample object files should not be proprietary as
    we may wish to include the object files in the regression test
    base.

    This file is applied to the preprocessor, thus any C comment and
    preprocessor control line is available.
*/

0xffffffff
DW_TAG_access_declaration

0xffffffff
DW_TAG_array_type
DW_TAG_subrange_type
DW_TAG_dynamic_type
DW_TAG_generic_subrange
DW_TAG_enumeration_type

0xffffffff
DW_TAG_base_type

0xffffffff
DW_TAG_call_site
DW_TAG_call_site_parameter

0xffffffff
DW_TAG_call_site_parameter

0xffffffff
DW_TAG_catch_block
DW_TAG_formal_parameter
DW_TAG_unspecified_parameters
DW_TAG_array_type
DW_TAG_class_type
DW_TAG_enumeration_type
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_string_type
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_base_type
DW_TAG_atomic_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_file_type
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type

0xffffffff
DW_TAG_class_type
DW_TAG_member
DW_TAG_inheritance
DW_TAG_access_declaration
DW_TAG_friend
DW_TAG_ptr_to_member_type
DW_TAG_subprogram
DW_TAG_template_type_parameter /* template instantiations */
DW_TAG_template_value_parameter /* template instantiations */
DW_TAG_typedef
DW_TAG_base_type
DW_TAG_pointer_type
DW_TAG_union_type
DW_TAG_coarray_type
DW_TAG_dynamic_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_class_type   /* Nested classes */
DW_TAG_structure_type   /* Nested structures */
DW_TAG_enumeration_type /* Nested enums */
DW_TAG_imported_declaration
DW_TAG_template_alias  /* C++ 2010 template alias */

0xffffffff
DW_TAG_coarray_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_dynamic_type
DW_TAG_array_type
DW_TAG_base_type

0xffffffff
DW_TAG_common_block
DW_TAG_variable

0xffffffff
DW_TAG_common_inclusion

0xffffffff
DW_TAG_compile_unit
DW_TAG_array_type
DW_TAG_dynamic_type
DW_TAG_class_type
DW_TAG_dwarf_procedure
DW_TAG_enumeration_type
DW_TAG_imported_declaration
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_rvalue_reference_type
DW_TAG_restrict_type  /* Used by LLVM */
DW_TAG_string_type
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_common_block
DW_TAG_inlined_subroutine
DW_TAG_module
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_base_type
DW_TAG_coarray_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_file_type
DW_TAG_namelist
DW_TAG_namespace
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type
DW_TAG_imported_module
DW_TAG_template_alias  /* C++ 2010 template alias */
DW_TAG_unspecified_type

0xffffffff
DW_TAG_type_unit
DW_TAG_array_type
DW_TAG_dynamic_type
DW_TAG_class_type
DW_TAG_enumeration_type
DW_TAG_imported_declaration
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_string_type
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_common_block
DW_TAG_inlined_subroutine
DW_TAG_module
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_base_type
DW_TAG_coarray_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_file_type
DW_TAG_namelist
DW_TAG_namespace
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type
DW_TAG_imported_module
DW_TAG_template_alias  /* C++ 2010 template alias */

0xffffffff
DW_TAG_condition /* COBOL */
DW_TAG_constant
DW_TAG_subrange_type

0xffffffff
DW_TAG_atomic_type

0xffffffff
DW_TAG_const_type

0xffffffff
DW_TAG_constant

0xffffffff
DW_TAG_dwarf_procedure

0xffffffff
DW_TAG_entry_point
DW_TAG_formal_parameter
DW_TAG_unspecified_parameters
DW_TAG_common_inclusion

0xffffffff
DW_TAG_enumeration_type
DW_TAG_enumerator

0xffffffff
DW_TAG_enumerator

0xffffffff
DW_TAG_file_type

0xffffffff
DW_TAG_formal_parameter

0xffffffff
DW_TAG_friend

0xffffffff
DW_TAG_imported_declaration

0xffffffff
DW_TAG_imported_module

0xffffffff
DW_TAG_imported_unit

0xffffffff
DW_TAG_inheritance

0xffffffff
DW_TAG_inlined_subroutine
DW_TAG_formal_parameter
DW_TAG_unspecified_parameters
DW_TAG_array_type
DW_TAG_dynamic_type
DW_TAG_class_type
DW_TAG_enumeration_type
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_string_type
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_lexical_block
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_inlined_subroutine
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_base_type
DW_TAG_coarray_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_file_type
DW_TAG_namelist
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type

0xffffffff
DW_TAG_interface_type
DW_TAG_member
DW_TAG_subprogram

0xffffffff
DW_TAG_label

0xffffffff
DW_TAG_lexical_block
DW_TAG_array_type
DW_TAG_dynamic_type
DW_TAG_class_type
DW_TAG_enumeration_type
DW_TAG_imported_declaration
DW_TAG_imported_module
DW_TAG_label
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_string_type
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_inlined_subroutine
DW_TAG_lexical_block
DW_TAG_module
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_base_type
DW_TAG_coarray_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_namelist
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type
DW_TAG_formal_parameter

0xffffffff
DW_TAG_member

0xffffffff
DW_TAG_module

0xffffffff
DW_TAG_namelist
DW_TAG_namelist_item

0xffffffff
DW_TAG_namelist_item

0xffffffff
DW_TAG_namespace
DW_TAG_array_type
DW_TAG_dynamic_type
DW_TAG_class_type
DW_TAG_enumeration_type
DW_TAG_imported_declaration
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_string_type
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_common_block
DW_TAG_inlined_subroutine
DW_TAG_module
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_base_type
DW_TAG_coarray_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_namelist
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type
DW_TAG_namespace        /* Allow a nested namespace */
DW_TAG_imported_module  /* Allow imported module */

0xffffffff
DW_TAG_packed_type

0xffffffff
DW_TAG_partial_unit
DW_TAG_array_type
DW_TAG_class_type
DW_TAG_dynamic_type
DW_TAG_enumeration_type
DW_TAG_imported_declaration
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_string_type
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_common_block
DW_TAG_inlined_subroutine
DW_TAG_module
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_base_type
DW_TAG_coarray_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_file_type
DW_TAG_namelist
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type

0xffffffff
DW_TAG_pointer_type
DW_TAG_atomic_type
DW_TAG_const_type
DW_TAG_packed_type
DW_TAG_reference_type
DW_TAG_restrict_type
DW_TAG_rvalue_reference_type
DW_TAG_shared_type
DW_TAG_volatile_type

0xffffffff
DW_TAG_ptr_to_member_type

0xffffffff
DW_TAG_reference_type
DW_TAG_atomic_type
DW_TAG_const_type
DW_TAG_packed_type
DW_TAG_pointer_type
DW_TAG_restrict_type
DW_TAG_rvalue_reference_type
DW_TAG_shared_type
DW_TAG_volatile_type

0xffffffff
DW_TAG_rvalue_reference_type
DW_TAG_atomic_type
DW_TAG_const_type
DW_TAG_packed_type
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_restrict_type
DW_TAG_shared_type
DW_TAG_volatile_type

0xffffffff
DW_TAG_restrict_type
DW_TAG_atomic_type
DW_TAG_const_type
DW_TAG_packed_type
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_rvalue_reference_type
DW_TAG_shared_type
DW_TAG_volatile_type

0xffffffff
DW_TAG_set_type

0xffffffff
DW_TAG_shared_type
DW_TAG_atomic_type
DW_TAG_const_type
DW_TAG_packed_type
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_restrict_type
DW_TAG_rvalue_reference_type
DW_TAG_shared_type
DW_TAG_volatile_type

0xffffffff
DW_TAG_string_type

0xffffffff
DW_TAG_structure_type
DW_TAG_member
DW_TAG_inheritance
DW_TAG_access_declaration
DW_TAG_friend
DW_TAG_ptr_to_member_type
DW_TAG_variant_part
DW_TAG_subprogram
DW_TAG_template_type_parameter /* template instantiations */
DW_TAG_template_value_parameter /* template instantiations */
DW_TAG_typedef
DW_TAG_base_type
DW_TAG_coarray_type
DW_TAG_pointer_type
DW_TAG_union_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_structure_type /* nested structures */
DW_TAG_enumeration_type /* nested enums */
DW_TAG_class_type /* nested classes */
DW_TAG_imported_declaration /* References to namespaces */
DW_TAG_template_alias  /* C++ 2010 template alias */

0xffffffff
DW_TAG_subprogram
DW_TAG_formal_parameter
DW_TAG_unspecified_parameters
DW_TAG_thrown_type
DW_TAG_template_type_parameter
DW_TAG_template_value_parameter
DW_TAG_pointer_type
DW_TAG_common_inclusion
DW_TAG_common_block
DW_TAG_array_type
DW_TAG_coarray_type
DW_TAG_class_type
DW_TAG_enumeration_type
DW_TAG_pointer_type
DW_TAG_reference_type
DW_TAG_string_type
DW_TAG_lexical_block
DW_TAG_structure_type
DW_TAG_subroutine_type
DW_TAG_typedef
DW_TAG_union_type
DW_TAG_inlined_subroutine
DW_TAG_ptr_to_member_type
DW_TAG_set_type
DW_TAG_subrange_type
DW_TAG_generic_subrange
DW_TAG_base_type
DW_TAG_const_type
DW_TAG_atomic_type
DW_TAG_constant
DW_TAG_file_type
DW_TAG_namelist
DW_TAG_packed_type
DW_TAG_subprogram
DW_TAG_variable
DW_TAG_volatile_type
DW_TAG_label
DW_TAG_imported_module      /* References to namespaces */
DW_TAG_imported_declaration /* References to namespaces */

0xffffffff
DW_TAG_subrange_type

0xffffffff
DW_TAG_generic_subrange

0xffffffff
DW_TAG_subroutine_type
DW_TAG_formal_parameter
DW_TAG_typedef
DW_TAG_unspecified_parameters

0xffffffff
DW_TAG_template_type_parameter

0xffffffff
DW_TAG_template_value_parameter

0xffffffff
DW_TAG_thrown_type

0xffffffff
DW_TAG_try_block

0xffffffff
DW_TAG_typedef

0xffffffff
DW_TAG_union_type
DW_TAG_friend
DW_TAG_member
DW_TAG_class_type  /* Nested classes */
DW_TAG_enumeration_type /* Nested enums */
DW_TAG_structure_type /* Nested structures */
DW_TAG_typedef        /* Nested typedef */
DW_TAG_subprogram
DW_TAG_template_type_parameter /* template instantiations */
DW_TAG_template_value_parameter /* template instantiations */
DW_TAG_union_type  /* Nested unions */

0xffffffff
DW_TAG_template_alias
DW_TAG_template_type_parameter
DW_TAG_template_value_parameter

0xffffffff
DW_TAG_unspecified_parameters

0xffffffff
DW_TAG_unspecified_type

0xffffffff
DW_TAG_variable

0xffffffff
DW_TAG_variant
DW_TAG_variant_part

0xffffffff
DW_TAG_variant_part

0xffffffff
DW_TAG_volatile_type

0xffffffff
DW_TAG_with_stmt

0xffffffff
