]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/common/common-targhooks.c
Update copyright years.
[thirdparty/gcc.git] / gcc / common / common-targhooks.c
CommitLineData
677f3fa8 1/* Default common target hook functions.
cbe34bb5 2 Copyright (C) 2003-2017 Free Software Foundation, Inc.
677f3fa8
JM
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#include "config.h"
21#include "system.h"
22#include "coretypes.h"
677f3fa8
JM
23#include "tm.h"
24#include "common/common-target.h"
25#include "common/common-targhooks.h"
26
27/* Determine the exception handling mechanism for the target. */
28
29enum unwind_info_type
30default_except_unwind_info (struct gcc_options *opts ATTRIBUTE_UNUSED)
31{
32 /* Obey the configure switch to turn on sjlj exceptions. */
33#ifdef CONFIG_SJLJ_EXCEPTIONS
34 if (CONFIG_SJLJ_EXCEPTIONS)
35 return UI_SJLJ;
36#endif
37
38 /* ??? Change all users to the hook, then poison this. */
39#ifdef DWARF2_UNWIND_INFO
40 if (DWARF2_UNWIND_INFO)
41 return UI_DWARF2;
42#endif
43
44 return UI_SJLJ;
45}
46
47/* To be used by targets that force dwarf2 unwind enabled. */
48
49enum unwind_info_type
50dwarf2_except_unwind_info (struct gcc_options *opts ATTRIBUTE_UNUSED)
51{
52 /* Obey the configure switch to turn on sjlj exceptions. */
53#ifdef CONFIG_SJLJ_EXCEPTIONS
54 if (CONFIG_SJLJ_EXCEPTIONS)
55 return UI_SJLJ;
56#endif
57
58 return UI_DWARF2;
59}
60
61/* To be used by targets that force sjlj unwind enabled. */
62
63enum unwind_info_type
64sjlj_except_unwind_info (struct gcc_options *opts ATTRIBUTE_UNUSED)
65{
66 return UI_SJLJ;
67}
68
69/* Default version of TARGET_HANDLE_OPTION. */
70
71bool
72default_target_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED,
73 struct gcc_options *opts_set ATTRIBUTE_UNUSED,
74 const struct cl_decoded_option *decoded ATTRIBUTE_UNUSED,
75 location_t loc ATTRIBUTE_UNUSED)
76{
77 return true;
78}
79
80const struct default_options empty_optimization_table[] =
81 {
82 { OPT_LEVELS_NONE, 0, NULL, 0 }
83 };