summaryrefslogtreecommitdiff
path: root/gcc/dwarf2cfi.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-11-13 17:26:41 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-11-13 17:26:41 +0000
commit2f02b2c29168b6db2a25deb8073557330f652508 (patch)
tree7258aea2ab239cf5e6c08384f4eb1d2d0464e1a8 /gcc/dwarf2cfi.c
parent41f0e8194de366399afb726a6862843d81f896a3 (diff)
re PR lto/81351 (Many LTO testcases FAIL)
PR lto/81351 * debug.h (dwarf2out_do_eh_frame): Declare. * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate. (dwarf2out_do_frame): Use it. (dwarf2out_do_cfi_asm): Likewise. * dwarf2out.c (dwarf2out_frame_finish): Likewise. (dwarf2out_assembly_start): Likewise. (dwarf2out_begin_prologue): Fix comment. * toplev.c (compile_file): Always call dwarf2out_frame_finish if the target needs either debug or unwind DWARF2 info. * lto-opts.c (lto_write_options): Do not save -fexceptions, -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros, -ftrapping-math, -ftrapv and -fwrapv. From-SVN: r254697
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r--gcc/dwarf2cfi.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index 45b5e3099d2..62117e7c850 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -3402,6 +3402,17 @@ debug_cfi_row (dw_cfi_row *row)
This variable is tri-state, with 0 unset, >0 true, <0 false. */
static GTY(()) signed char saved_do_cfi_asm = 0;
+/* Decide whether to emit EH frame unwind information for the current
+ translation unit. */
+
+bool
+dwarf2out_do_eh_frame (void)
+{
+ return
+ (flag_unwind_tables || flag_exceptions)
+ && targetm_common.except_unwind_info (&global_options) == UI_DWARF2;
+}
+
/* Decide whether we want to emit frame unwind information for the current
translation unit. */
@@ -3420,8 +3431,7 @@ dwarf2out_do_frame (void)
if (targetm.debug_unwind_info () == UI_DWARF2)
return true;
- if ((flag_unwind_tables || flag_exceptions)
- && targetm_common.except_unwind_info (&global_options) == UI_DWARF2)
+ if (dwarf2out_do_eh_frame ())
return true;
return false;
@@ -3456,9 +3466,7 @@ dwarf2out_do_cfi_asm (void)
/* If we can't get the assembler to emit only .debug_frame, and we don't need
dwarf2 unwind info for exceptions, then emit .debug_frame by hand. */
- if (!HAVE_GAS_CFI_SECTIONS_DIRECTIVE
- && !flag_unwind_tables && !flag_exceptions
- && targetm_common.except_unwind_info (&global_options) != UI_DWARF2)
+ if (!HAVE_GAS_CFI_SECTIONS_DIRECTIVE && !dwarf2out_do_eh_frame ())
return false;
/* Success! */