cp_decl_specifier_seq decl_specifiers;
tree extension_specifier = NULL_TREE;
- timevar_push (TV_TEMPLATE_INST);
+ auto_timevar tv (TV_TEMPLATE_INST);
/* Look for an (optional) storage-class-specifier or
function-specifier. */
cp_parser_consume_semicolon_at_end_of_statement (parser);
- timevar_pop (TV_TEMPLATE_INST);
-
cp_finalize_omp_declare_simd (parser, &odsd);
}
elaborated-type-specifier. */
if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE))
{
- timevar_push (TV_PARSE_ENUM);
+ auto_timevar tv (TV_PARSE_ENUM);
+
if (nested_name_specifier
&& nested_name_specifier != error_mark_node)
{
if (scoped_enum_p)
finish_scope ();
- timevar_pop (TV_PARSE_ENUM);
}
else
{
Returns the TREE_TYPE representing the class. */
-static tree
-cp_parser_class_specifier_1 (cp_parser* parser)
+tree
+cp_parser_class_specifier (cp_parser* parser)
{
+ auto_timevar tv (TV_PARSE_STRUCT);
+
tree type;
tree attributes = NULL_TREE;
bool nested_name_specifier_p;
return type;
}
-static tree
-cp_parser_class_specifier (cp_parser* parser)
-{
- tree ret;
- timevar_push (TV_PARSE_STRUCT);
- ret = cp_parser_class_specifier_1 (parser);
- timevar_pop (TV_PARSE_STRUCT);
- return ret;
-}
-
/* Parse a class-head.
class-head:
}
else
{
- timevar_id_t tv;
- if (DECL_DECLARED_INLINE_P (current_function_decl))
- tv = TV_PARSE_INLINE;
- else
- tv = TV_PARSE_FUNC;
- timevar_push (tv);
+ auto_timevar tv (DECL_DECLARED_INLINE_P (current_function_decl)
+ ? TV_PARSE_INLINE : TV_PARSE_FUNC);
fn = cp_parser_function_definition_after_declarator (parser,
/*inline_p=*/false);
- timevar_pop (tv);
}
return fn;
static void
cp_parser_late_parsing_for_member (cp_parser* parser, tree member_function)
{
- timevar_push (TV_PARSE_INMETH);
+ auto_timevar tv (TV_PARSE_INMETH);
+
/* If this member is a template, get the underlying
FUNCTION_DECL. */
if (DECL_FUNCTION_TEMPLATE_P (member_function))
/* Restore the queue. */
pop_unparsed_function_queues (parser);
- timevar_pop (TV_PARSE_INMETH);
}
/* If DECL contains any default args, remember it on the unparsed
that we want to avoid. It also causes some problems with argument
coercion (see convert_nontype_argument for more information on this). */
-static tree
-lookup_template_class_1 (tree d1, tree arglist, tree in_decl, tree context,
- int entering_scope, tsubst_flags_t complain)
+tree
+lookup_template_class (tree d1, tree arglist, tree in_decl, tree context,
+ int entering_scope, tsubst_flags_t complain)
{
+ auto_timevar tv (TV_TEMPLATE_INST);
+
tree templ = NULL_TREE, parmlist;
tree t;
spec_entry **slot;
}
}
-/* Wrapper for lookup_template_class_1. */
-
-tree
-lookup_template_class (tree d1, tree arglist, tree in_decl, tree context,
- int entering_scope, tsubst_flags_t complain)
-{
- tree ret;
- timevar_push (TV_TEMPLATE_INST);
- ret = lookup_template_class_1 (d1, arglist, in_decl, context,
- entering_scope, complain);
- timevar_pop (TV_TEMPLATE_INST);
- return ret;
-}
-
/* Return a TEMPLATE_ID_EXPR for the given variable template and ARGLIST. */
tree
}
}
-static tree
-instantiate_class_template_1 (tree type)
+tree
+instantiate_class_template (tree type)
{
+ auto_timevar tv (TV_TEMPLATE_INST);
+
tree templ, args, pattern, t, member;
tree typedecl;
tree pbinfo;
return type;
}
-/* Wrapper for instantiate_class_template_1. */
-
-tree
-instantiate_class_template (tree type)
-{
- tree ret;
- timevar_push (TV_TEMPLATE_INST);
- ret = instantiate_class_template_1 (type);
- timevar_pop (TV_TEMPLATE_INST);
- return ret;
-}
-
tree
tsubst_template_arg (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{
/* Instantiate the indicated variable, function, or alias template TMPL with
the template arguments in TARG_PTR. */
-static tree
-instantiate_template_1 (tree tmpl, tree orig_args, tsubst_flags_t complain)
+tree
+instantiate_template (tree tmpl, tree orig_args, tsubst_flags_t complain)
{
+ auto_timevar tv (TV_TEMPLATE_INST);
+
tree targ_ptr = orig_args;
tree fndecl;
tree gen_tmpl;
return fndecl;
}
-/* Wrapper for instantiate_template_1. */
-
-tree
-instantiate_template (tree tmpl, tree orig_args, tsubst_flags_t complain)
-{
- tree ret;
- timevar_push (TV_TEMPLATE_INST);
- ret = instantiate_template_1 (tmpl, orig_args, complain);
- timevar_pop (TV_TEMPLATE_INST);
- return ret;
-}
-
/* Instantiate the alias template TMPL with ARGS. Also push a template
instantiation level, which instantiate_template doesn't do because
functions and variables have sufficient context established by the
if (! push_tinst_level (d))
return d;
- timevar_push (TV_TEMPLATE_INST);
+ auto_timevar tv (TV_TEMPLATE_INST);
/* Set TD to the template whose DECL_TEMPLATE_RESULT is the pattern
for the instantiation. */
}
pop_deferring_access_checks ();
- timevar_pop (TV_TEMPLATE_INST);
pop_tinst_level ();
input_location = saved_loc;
cp_unevaluated_operand = saved_unevaluated_operand;