From aa701610e51ca9e15573ba080cb93ef726252cfc Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Fri, 30 Oct 2020 14:30:43 +0100 Subject: Fix thunk info WRT PCH PR pch/97593 * cgraph.c (cgraph_node::create_thunk): Register thunk as early during parsing. * cgraphunit.c (analyze_functions): Call thunk_info::process_early_thunks. * symtab-thunks.cc (struct unprocessed_thunk): New struct. (thunks): New static variable. (thunk_info::register_early): New member function. (thunk_info::process_early_thunks): New member function. * symtab-thunks.h (thunk_info::register_early): Declare. (thunk_info::process_early_thunks): Declare. --- gcc/cgraphunit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/cgraphunit.c') diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 08b93cb..3a98958 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1155,6 +1155,8 @@ analyze_functions (bool first_time) symtab->state = CONSTRUCTION; input_location = UNKNOWN_LOCATION; + thunk_info::process_early_thunks (); + /* Ugly, but the fixup cannot happen at a time same body alias is created; C++ FE is confused about the COMDAT groups being right. */ if (symtab->cpp_implicit_aliases_done) -- cgit v1.1