summaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2008-01-16 12:10:27 +0100
committerUros Bizjak <uros@gcc.gnu.org>2008-01-16 12:10:27 +0100
commita4b6974e6b2a85f7fe9e62e3bce8b6587eaf2a2e (patch)
treeeaacc8b781abdc15ec346c4cab998439767ce5a2 /gcc/final.c
parentbe2b548394a3d0998cf7fff5e9d85fcecd22d5f7 (diff)
downloadgcc-a4b6974e6b2a85f7fe9e62e3bce8b6587eaf2a2e.tar.gz
re PR debug/34249 (FAIL: gcc.dg/tree-prof/bb-reorg.c compilation, -fprofile-use -D_PROFILE_USE)
PR debug/34249 * debug.h (dwarf2out_switch_text_section): Move declaration from ... * dwarf2out.c (dwarf2out_switch_text_section): ... here. Make function global. * final.c (final_scan_insn) [NOTE_INSN_SWITCH_TEXT_SECTIONS]: Depending on dwarf2out_do_frame, call dwarf2out_switch_text_section for DWARF2_UNWIND_INFO targets. From-SVN: r131570
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c
index 72edbc05acc..a33da0cfd65 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1777,7 +1777,13 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
case NOTE_INSN_SWITCH_TEXT_SECTIONS:
in_cold_section_p = !in_cold_section_p;
- (*debug_hooks->switch_text_section) ();
+#ifdef DWARF2_UNWIND_INFO
+ if (dwarf2out_do_frame ())
+ dwarf2out_switch_text_section ();
+ else
+#endif
+ (*debug_hooks->switch_text_section) ();
+
switch_to_section (current_function_section ());
break;