aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-11-08 20:15:06 +0000
committerJakub Jelinek <jakub@redhat.com>2012-11-08 20:15:06 +0000
commit1420309f0294b258c84bda7def44c139c22004a9 (patch)
tree7d1e599dafdd58e8d11721fe395f8d016c1e71aa /gcc/cgraphunit.c
parent7ac03cf4de7b7a4e7416d4be4787486136697fd2 (diff)
PR debug/54499
* cgraphunit.c (assemble_thunk): Don't call source_line debug hook here, instead call insn_locations_{init,finalize} and initialize prologue_location. * g++.dg/debug/pr54499.C: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193338 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index bf1326bbb88..e14e52ed668 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1413,16 +1413,16 @@ assemble_thunk (struct cgraph_node *node)
DECL_INITIAL (thunk_fndecl) = fn_block;
init_function_start (thunk_fndecl);
cfun->is_thunk = 1;
+ insn_locations_init ();
+ set_curr_insn_location (DECL_SOURCE_LOCATION (thunk_fndecl));
+ prologue_location = curr_insn_location ();
assemble_start_function (thunk_fndecl, fnname);
- (*debug_hooks->source_line) (DECL_SOURCE_LINE (thunk_fndecl),
- DECL_SOURCE_FILE (thunk_fndecl),
- /* discriminator */ 0,
- /* is_stmt */ 1);
targetm.asm_out.output_mi_thunk (asm_out_file, thunk_fndecl,
fixed_offset, virtual_value, alias);
assemble_end_function (thunk_fndecl, fnname);
+ insn_locations_finalize ();
init_insn_lengths ();
free_after_compilation (cfun);
set_cfun (NULL);