This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH v2 3/6] Split symtab_node declarations onto multiple lines
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <hubicka at ucw dot cz>, David Malcolm <dmalcolm at redhat dot com>
- Date: Mon, 9 Sep 2013 15:32:17 -0400
- Subject: [PATCH v2 3/6] Split symtab_node declarations onto multiple lines
- Authentication-results: sourceware.org; auth=none
- References: <20130820210104 dot GC16244 at atrey dot karlin dot mff dot cuni dot cz> <1378755140-5555-1-git-send-email-dmalcolm at redhat dot com>
Amongst other things, the rename_symtab.py script converts
"symtab_node" to "symtab_node *".
This will lead to broken code on declarations that declare
more than one variable (only the first would get a "*"), so split
up such declarations.
gcc/
* cgraphunit.c (analyze_functions): Split symtab_node
declarations onto multiple lines to make things easier
for rename_symtab.py.
* symtab.c (symtab_dissolve_same_comdat_group_list): Likewise.
(symtab_semantically_equivalent_p): Likewise.
gcc/lto
* lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
declarations onto multiple lines to make things easier for
rename_symtab.py.
(lto_symtab_merge_decls_1): Likewise.
(lto_symtab_merge_symbols_1): Likewise.
---
gcc/cgraphunit.c | 3 ++-
gcc/lto/lto-symtab.c | 9 ++++++---
gcc/symtab.c | 6 ++++--
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 5a8909f..351291b 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -906,7 +906,8 @@ analyze_functions (void)
struct varpool_node *first_handled_var = first_analyzed_var;
struct pointer_set_t *reachable_call_targets = pointer_set_create ();
- symtab_node node, next;
+ symtab_node node;
+ symtab_node next;
int i;
struct ipa_ref *ref;
bool changed = true;
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index 13646bb..ec42a93 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -361,7 +361,8 @@ lto_symtab_resolve_symbols (symtab_node first)
static void
lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p)
{
- symtab_node prevailing, e;
+ symtab_node prevailing;
+ symtab_node e;
vec<tree> mismatches = vNULL;
unsigned i;
tree decl;
@@ -413,7 +414,8 @@ lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p)
static void
lto_symtab_merge_decls_1 (symtab_node first)
{
- symtab_node e, prevailing;
+ symtab_node e;
+ symtab_node prevailing;
bool diagnosed_p = false;
if (cgraph_dump_file)
@@ -536,7 +538,8 @@ lto_symtab_merge_decls (void)
static void
lto_symtab_merge_symbols_1 (symtab_node prevailing)
{
- symtab_node e, next;
+ symtab_node e;
+ symtab_node next;
/* Replace the cgraph node of each entry with the prevailing one. */
for (e = prevailing->next_sharing_asm_name; e;
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 8079854..2b612b3 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -441,7 +441,8 @@ symtab_add_to_same_comdat_group (symtab_node new_node,
void
symtab_dissolve_same_comdat_group_list (symtab_node node)
{
- symtab_node n = node, next;
+ symtab_node n = node;
+ symtab_node next;
if (!node->same_comdat_group)
return;
@@ -1124,7 +1125,8 @@ symtab_semantically_equivalent_p (symtab_node a,
symtab_node b)
{
enum availability avail;
- symtab_node ba, bb;
+ symtab_node ba;
+ symtab_node bb;
/* Equivalent functions are equivalent. */
if (a->decl == b->decl)
--
1.7.11.7