summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-27 04:18:38 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-27 04:18:38 +0000
commit7bbf0ff23c86d681282b4773ee3bb7bab7fddb86 (patch)
treed8f2d6ee50de4a3d7d6e80c118985acd5c7adfcf /gcc/tree.c
parentad0e1ebae802dd7f308be17e81f57a90f88650df (diff)
downloadgcc-7bbf0ff23c86d681282b4773ee3bb7bab7fddb86.tar.gz
* tree.h (decl_comdat_group): Declare.
* cgraph.h (symtab_in_same_comdat_p): Move offline to ... * tree.c (decl_comdat_group): Here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210956 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index bfdfebdf2de..394a821c01a 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -603,6 +603,16 @@ decl_assembler_name (tree decl)
return DECL_WITH_VIS_CHECK (decl)->decl_with_vis.assembler_name;
}
+/* Return comdat group of DECL. */
+tree
+decl_comdat_group (tree node)
+{
+ struct symtab_node *snode = symtab_get_node (node);
+ if (!snode)
+ return NULL;
+ return snode->get_comdat_group ();
+}
+
/* Compute the number of bytes occupied by a tree with code CODE.
This function cannot be used for nodes that have variable sizes,
including TREE_VEC, INTEGER_CST, STRING_CST, and CALL_EXPR. */