Do not load the thunk symbols.
authorWang Liushuai <wangliushuai@bytedance.com>
Mon, 24 May 2021 08:09:29 +0000 (10:09 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 24 May 2021 08:09:54 +0000 (10:09 +0200)
gcc/lto/ChangeLog:

* lto-dump.c (get_size): Fix the NPD error about the thunk symbol.

gcc/lto/lto-dump.c

index 8344d3e..3586e20 100644 (file)
@@ -122,7 +122,7 @@ public:
     cgraph_node *cnode = dyn_cast<cgraph_node *> (node);
     gcc_assert (cnode);
 
-    return (cnode->definition && !cnode->alias)
+    return (cnode->definition && !cnode->thunk && !cnode->alias)
      ? n_basic_blocks_for_fn (DECL_STRUCT_FUNCTION (cnode->decl))
      : 0;
   }