Automatic date update in version.in
[binutils-gdb.git] / gdb / dwarf2 / tag.h
blob735a6d581be8bac9bc8aa786929c130bd98b7f9b
1 /* Tag attributes
3 Copyright (C) 2022 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef GDB_DWARF2_TAG_H
21 #define GDB_DWARF2_TAG_H
23 #include "dwarf2.h"
25 /* Return true if TAG represents a type, false otherwise. */
27 static inline bool
28 tag_is_type (dwarf_tag tag)
30 switch (tag)
32 case DW_TAG_padding:
33 case DW_TAG_array_type:
34 case DW_TAG_class_type:
35 case DW_TAG_enumeration_type:
36 case DW_TAG_pointer_type:
37 case DW_TAG_reference_type:
38 case DW_TAG_string_type:
39 case DW_TAG_structure_type:
40 case DW_TAG_subroutine_type:
41 case DW_TAG_typedef:
42 case DW_TAG_union_type:
43 case DW_TAG_ptr_to_member_type:
44 case DW_TAG_set_type:
45 case DW_TAG_subrange_type:
46 case DW_TAG_base_type:
47 case DW_TAG_const_type:
48 case DW_TAG_packed_type:
49 case DW_TAG_template_type_param:
50 case DW_TAG_volatile_type:
51 case DW_TAG_restrict_type:
52 case DW_TAG_interface_type:
53 case DW_TAG_namespace:
54 case DW_TAG_unspecified_type:
55 case DW_TAG_shared_type:
56 case DW_TAG_rvalue_reference_type:
57 case DW_TAG_coarray_type:
58 case DW_TAG_dynamic_type:
59 case DW_TAG_atomic_type:
60 case DW_TAG_immutable_type:
61 return true;
62 default:
63 return false;
67 #endif /* GDB_DWARF2_TAG_H */