Commit 8dc70667 by Gabriel Dos Reis

Really commit all changes

From-SVN: r201989
parent 5339fc0c
......@@ -837,7 +837,7 @@ pp_c_function_definition (c_pretty_printer *pp, tree t)
pp_declaration_specifiers (pp, t);
pp_declarator (pp, t);
pp_needs_newline (pp) = true;
pp_statement (pp, DECL_SAVED_TREE (t));
pp->statement (DECL_SAVED_TREE (t));
pp_newline_and_flush (pp);
}
......@@ -2306,15 +2306,15 @@ c_pretty_printer::expression (tree e)
/* Statements. */
void
pp_c_statement (c_pretty_printer *pp, tree stmt)
c_pretty_printer::statement (tree stmt)
{
if (stmt == NULL)
return;
if (pp_needs_newline (pp))
pp_newline_and_indent (pp, 0);
if (pp_needs_newline (this))
pp_newline_and_indent (this, 0);
dump_generic_node (pp, stmt, pp_indentation (pp), 0, true);
dump_generic_node (this, stmt, pp_indentation (this), 0, true);
}
......@@ -2339,8 +2339,6 @@ c_pretty_printer::c_pretty_printer ()
function_specifier = pp_c_function_specifier;
storage_class_specifier = pp_c_storage_class_specifier;
statement = pp_c_statement;
initializer = pp_c_initializer;
}
......@@ -2354,7 +2352,7 @@ print_c_tree (FILE *file, tree t)
pp_needs_newline (&pp) = true;
pp.buffer->stream = file;
pp_statement (&pp, t);
pp.statement (t);
pp_newline_and_flush (&pp);
}
......
......@@ -63,6 +63,9 @@ struct c_pretty_printer : pretty_printer
virtual void conditional_expression (tree);
virtual void assignment_expression (tree);
virtual void expression (tree);
virtual void statement (tree);
/* Points to the first element of an array of offset-list.
Not used yet. */
int *offset_list;
......@@ -86,8 +89,6 @@ struct c_pretty_printer : pretty_printer
c_pretty_print_fn storage_class_specifier;
c_pretty_print_fn initializer;
c_pretty_print_fn statement;
};
#define pp_c_tree_identifier(PPI, ID) \
......@@ -159,8 +160,6 @@ void pp_c_type_id (c_pretty_printer *, tree);
void pp_c_direct_abstract_declarator (c_pretty_printer *, tree);
void pp_c_type_specifier (c_pretty_printer *, tree);
void pp_c_storage_class_specifier (c_pretty_printer *, tree);
/* Statements. */
void pp_c_statement (c_pretty_printer *, tree);
/* Expressions. */
void pp_c_logical_or_expression (c_pretty_printer *, tree);
void pp_c_expression_list (c_pretty_printer *, tree);
......
......@@ -120,7 +120,7 @@ c_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
t = DECL_DEBUG_EXPR (t);
if (!DECL_P (t))
{
pp_c_expression (cpp, t);
pp_expression (cpp, t);
return true;
}
}
......
......@@ -42,6 +42,8 @@ struct cxx_pretty_printer : c_pretty_printer
void conditional_expression (tree);
void assignment_expression (tree);
void expression (tree);
void statement (tree);
/* This is the enclosing scope of the entity being pretty-printed. */
tree enclosing_scope;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment