cgraph: move former_thunk_p out of CHECKING_P macro.
authorMartin Liska <mliska@suse.cz>
Sat, 24 Oct 2020 06:41:16 +0000 (08:41 +0200)
committerMartin Liska <mliska@suse.cz>
Sat, 24 Oct 2020 06:42:33 +0000 (08:42 +0200)
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.

gcc/cgraph.c

index 9f31773..d1a773d 100644 (file)
@@ -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"