From: Martin Liska Date: Sat, 24 Oct 2020 06:41:16 +0000 (+0200) Subject: cgraph: move former_thunk_p out of CHECKING_P macro. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a29ff9c53a77b6e208350d8c6db0f3e988f61d1f;p=gcc.git cgraph: move former_thunk_p out of CHECKING_P macro. This fixes the following failure: ld: cgraph.o: in function `cgraph_edge::verify_corresponds_to_fndecl(tree_node*)': gcc/cgraph.c:3067: undefined reference to `cgraph_node::former_thunk_p()' ld: cgraph.o: in function `clone_of_p': gcc/ChangeLog: * cgraph.c (cgraph_node::former_thunk_p): Move out of CHECKING_P macro. --- diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 9f317733c91..d1a773d386f 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -4098,6 +4098,21 @@ cgraph_node::check_calls_comdat_local_p () return false; } +/* Return true if this node represents a former, i.e. an expanded, thunk. */ + +bool +cgraph_node::former_thunk_p (void) +{ + if (thunk) + return false; + thunk_info *i = thunk_info::get (this); + if (!i) + return false; + gcc_checking_assert (i->fixed_offset || i->virtual_offset_p + || i->indirect_offset); + return true; +} + /* A stashed copy of "symtab" for use by selftest::symbol_table_test. This needs to be a global so that it can be a GC root, and thus prevent the stashed copy from being garbage-collected if the GC runs @@ -4162,21 +4177,6 @@ cgraph_c_tests () } // namespace selftest -/* Return true if this node represents a former, i.e. an expanded, thunk. */ - -bool -cgraph_node::former_thunk_p (void) -{ - if (thunk) - return false; - thunk_info *i = thunk_info::get (this); - if (!i) - return false; - gcc_checking_assert (i->fixed_offset || i->virtual_offset_p - || i->indirect_offset); - return true; -} - #endif /* CHECKING_P */ #include "gt-cgraph.h"