1 /* Get the default subrange lower bound for a given language.
2 Copyright (C) 2016 Red Hat, Inc.
3 This file is part of elfutils.
5 This file is free software; you can redistribute it and/or modify
6 it under the terms of either
8 * the GNU Lesser General Public License as published by the Free
9 Software Foundation; either version 3 of the License, or (at
10 your option) any later version
14 * the GNU General Public License as published by the Free
15 Software Foundation; either version 2 of the License, or (at
16 your option) any later version
18 or both in parallel, as here.
20 elfutils is distributed in the hope that it will be useful, but
21 WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 General Public License for more details.
25 You should have received copies of the GNU General Public License and
26 the GNU Lesser General Public License along with this program. If
27 not, see <http://www.gnu.org/licenses/>. */
36 /* Determine default lower bound from language, as per the DWARF5
37 "Subrange Type Entries" table. */
39 dwarf_default_lower_bound (int lang, Dwarf_Sword *result)
47 case DW_LANG_C_plus_plus:
48 case DW_LANG_C_plus_plus_03:
49 case DW_LANG_C_plus_plus_11:
50 case DW_LANG_C_plus_plus_14:
52 case DW_LANG_ObjC_plus_plus:
64 case DW_LANG_RenderScript:
73 case DW_LANG_Fortran77:
74 case DW_LANG_Fortran90:
75 case DW_LANG_Fortran95:
76 case DW_LANG_Fortran03:
77 case DW_LANG_Fortran08:
78 case DW_LANG_Pascal83:
87 __libdw_seterrno (DWARF_E_UNKNOWN_LANGUAGE);
91 INTDEF (dwarf_default_lower_bound)