struct z_candidate *cand;
tree ret;
- bool subtime = timevar_cond_start (TV_OVERLOAD);
+ auto_cond_timevar tv (TV_OVERLOAD);
cand = build_user_type_conversion_1 (totype, expr, flags, complain);
if (cand)
else
ret = NULL_TREE;
- timevar_cond_stop (TV_OVERLOAD, subtime);
return ret;
}
tree explicit_targs;
int template_only;
- bool subtime = timevar_cond_start (TV_OVERLOAD);
+ auto_cond_timevar tv (TV_OVERLOAD);
explicit_targs = NULL_TREE;
template_only = 0;
else
cand = NULL;
- timevar_cond_stop (TV_OVERLOAD, subtime);
return cand;
}
/* Build a new call to operator(). This may change ARGS. */
-static tree
-build_op_call_1 (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain)
+tree
+build_op_call (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain)
{
struct z_candidate *candidates = 0, *cand;
tree fns, convs, first_mem_arg = NULL_TREE;
tree result = NULL_TREE;
void *p;
+ auto_cond_timevar tv (TV_OVERLOAD);
+
obj = mark_lvalue_use (obj);
if (error_operand_p (obj))
return result;
}
-/* Wrapper for above. */
-
-tree
-build_op_call (tree obj, vec<tree, va_gc> **args, tsubst_flags_t complain)
-{
- tree ret;
- bool subtime = timevar_cond_start (TV_OVERLOAD);
- ret = build_op_call_1 (obj, args, complain);
- timevar_cond_stop (TV_OVERLOAD, subtime);
- return ret;
-}
-
/* Called by op_error to prepare format strings suitable for the error
function. It concatenates a prefix (controlled by MATCH), ERRMSG,
and a suffix (controlled by NTYPES). */
/* Implement [expr.cond]. ARG1, ARG2, and ARG3 are the three
arguments to the conditional expression. */
-static tree
-build_conditional_expr_1 (const op_location_t &loc,
- tree arg1, tree arg2, tree arg3,
- tsubst_flags_t complain)
+tree
+build_conditional_expr (const op_location_t &loc,
+ tree arg1, tree arg2, tree arg3,
+ tsubst_flags_t complain)
{
tree arg2_type;
tree arg3_type;
void *p;
tree orig_arg2, orig_arg3;
+ auto_cond_timevar tv (TV_OVERLOAD);
+
/* As a G++ extension, the second argument to the conditional can be
omitted. (So that `a ? : c' is roughly equivalent to `a ? a :
c'.) If the second operand is omitted, make sure it is
&& !VECTOR_TYPE_P (arg3_type))
{
/* Rely on the error messages of the scalar version. */
- tree scal = build_conditional_expr_1 (loc, integer_one_node,
- orig_arg2, orig_arg3, complain);
+ tree scal = build_conditional_expr (loc, integer_one_node,
+ orig_arg2, orig_arg3, complain);
if (scal == error_mark_node)
return error_mark_node;
tree stype = TREE_TYPE (scal);
return result;
}
-/* Wrapper for above. */
-
-tree
-build_conditional_expr (const op_location_t &loc,
- tree arg1, tree arg2, tree arg3,
- tsubst_flags_t complain)
-{
- tree ret;
- bool subtime = timevar_cond_start (TV_OVERLOAD);
- ret = build_conditional_expr_1 (loc, arg1, arg2, arg3, complain);
- timevar_cond_stop (TV_OVERLOAD, subtime);
- return ret;
-}
-
/* OPERAND is an operand to an expression. Perform necessary steps
required before using it. If OPERAND is NULL_TREE, NULL_TREE is
returned. */
return NULL_TREE;
}
-static tree
-build_new_op_1 (const op_location_t &loc, enum tree_code code, int flags,
- tree arg1, tree arg2, tree arg3, tree *overload,
- tsubst_flags_t complain)
+tree
+build_new_op (const op_location_t &loc, enum tree_code code, int flags,
+ tree arg1, tree arg2, tree arg3, tree *overload,
+ tsubst_flags_t complain)
{
struct z_candidate *candidates = 0, *cand;
vec<tree, va_gc> *arglist;
bool strict_p;
bool any_viable_p;
+ auto_cond_timevar tv (TV_OVERLOAD);
+
if (error_operand_p (arg1)
|| error_operand_p (arg2)
|| error_operand_p (arg3))
code = PREINCREMENT_EXPR;
else
code = PREDECREMENT_EXPR;
- result = build_new_op_1 (loc, code, flags, arg1, NULL_TREE,
- NULL_TREE, overload, complain);
+ result = build_new_op (loc, code, flags, arg1, NULL_TREE,
+ NULL_TREE, overload, complain);
break;
/* The caller will deal with these. */
return NULL_TREE;
}
-/* Wrapper for above. */
-
-tree
-build_new_op (const op_location_t &loc, enum tree_code code, int flags,
- tree arg1, tree arg2, tree arg3,
- tree *overload, tsubst_flags_t complain)
-{
- tree ret;
- bool subtime = timevar_cond_start (TV_OVERLOAD);
- ret = build_new_op_1 (loc, code, flags, arg1, arg2, arg3,
- overload, complain);
- timevar_cond_stop (TV_OVERLOAD, subtime);
- return ret;
-}
-
/* CALL was returned by some call-building function; extract the actual
CALL_EXPR from any bits that have been tacked on, e.g. by
convert_from_reference. */
be set, upon return, to the function called. ARGS may be NULL.
This may change ARGS. */
-static tree
-build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args,
- tree conversion_path, int flags,
- tree *fn_p, tsubst_flags_t complain)
+tree
+build_new_method_call (tree instance, tree fns, vec<tree, va_gc> **args,
+ tree conversion_path, int flags,
+ tree *fn_p, tsubst_flags_t complain)
{
struct z_candidate *candidates = 0, *cand;
tree explicit_targs = NULL_TREE;
vec<tree, va_gc> *orig_args = NULL;
void *p;
+ auto_cond_timevar tv (TV_OVERLOAD);
+
gcc_assert (instance != NULL_TREE);
/* We don't know what function we're going to call, yet. */
return call;
}
-/* Wrapper for above. */
-
-tree
-build_new_method_call (tree instance, tree fns, vec<tree, va_gc> **args,
- tree conversion_path, int flags,
- tree *fn_p, tsubst_flags_t complain)
-{
- tree ret;
- bool subtime = timevar_cond_start (TV_OVERLOAD);
- ret = build_new_method_call_1 (instance, fns, args, conversion_path, flags,
- fn_p, complain);
- timevar_cond_stop (TV_OVERLOAD, subtime);
- return ret;
-}
-
/* Returns true iff standard conversion sequence ICS1 is a proper
subsequence of ICS2. */
tree decl;
scope_kind kind;
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
restart:
block = NULL_TREE;
if (kind == sk_cleanup)
goto restart;
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return block;
}
void
determine_local_discriminator (tree decl)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
retrofit_lang_decl (decl);
tree ctx = DECL_CONTEXT (decl);
tree name = (TREE_CODE (decl) == TYPE_DECL
local_entities->quick_push (decl);
local_entities->quick_push (name);
}
-
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
}
\f
static named_label_entry *
lookup_label_1 (tree id, bool making_local_p)
{
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
/* You can't use labels at global scope. */
if (current_function_decl == NULL_TREE)
{
tree
lookup_label (tree id)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
named_label_entry *ent = lookup_label_1 (id, false);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return ent ? ent->label_decl : NULL_TREE;
}
tree
declare_local_label (tree id)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
named_label_entry *ent = lookup_label_1 (id, true);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return ent ? ent->label_decl : NULL_TREE;
}
/* Define a label, specifying the location in the source file.
Return the LABEL_DECL node for the label. */
-static tree
-define_label_1 (location_t location, tree name)
+tree
+define_label (location_t location, tree name)
{
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
/* After labels, make any new cleanups in the function go into their
own new (temporary) binding contour. */
for (cp_binding_level *p = current_binding_level;
return decl;
}
-/* Wrapper for define_label_1. */
-
-tree
-define_label (location_t location, tree name)
-{
- bool running = timevar_cond_start (TV_NAME_LOOKUP);
- tree ret = define_label_1 (location, name);
- timevar_cond_stop (TV_NAME_LOOKUP, running);
- return ret;
-}
-
-
struct cp_switch
{
cp_binding_level *level;
TEMPLATE_HEADER_P is true when this declaration is preceded by
a set of template parameters. */
-static tree
-xref_tag_1 (enum tag_types tag_code, tree name,
- TAG_how how, bool template_header_p)
+tree
+xref_tag (enum tag_types tag_code, tree name,
+ TAG_how how, bool template_header_p)
{
enum tree_code code;
tree context = NULL_TREE;
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
gcc_assert (identifier_p (name));
switch (tag_code)
return t;
}
-/* Wrapper for xref_tag_1. */
-
-tree
-xref_tag (enum tag_types tag_code, tree name,
- TAG_how how, bool template_header_p)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- tree ret = xref_tag_1 (tag_code, name, how, template_header_p);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return ret;
-}
-
/* Create the binfo hierarchy for REF with (possibly NULL) base list
BASE_LIST. For each element on BASE_LIST the TREE_PURPOSE is an
access_* node, and the TREE_VALUE is the type of the base-class.
static cxx_binding *cxx_binding_make (tree value, tree type);
static cp_binding_level *innermost_nonclass_level (void);
-static tree do_pushdecl (tree decl, bool hiding);
static void set_identifier_type_value_with_scope (tree id, tree decl,
cp_binding_level *b);
static name_hint maybe_suggest_missing_std_header (location_t location,
tree
lookup_arg_dependent (tree name, tree fns, vec<tree, va_gc> *args)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
name_lookup lookup (name);
- fns = lookup.search_adl (fns, args);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return fns;
+ return lookup.search_adl (fns, args);
}
/* FNS is an overload set of conversion functions. Return the
was successful. */
static bool
-supplement_binding_1 (cxx_binding *binding, tree decl)
+supplement_binding (cxx_binding *binding, tree decl)
{
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
tree bval = binding->value;
bool ok = true;
tree target_bval = strip_using_decl (bval);
inform (location_of (bval), "previous declaration %q#D", bval);
}
-/* Wrapper for supplement_binding_1. */
-
-static bool
-supplement_binding (cxx_binding *binding, tree decl)
-{
- bool ret;
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- ret = supplement_binding_1 (binding, decl);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return ret;
-}
-
/* Replace BINDING's current value on its scope's name list with
NEWVAL. */
/* Expected default linkage is from the namespace. */
TREE_PUBLIC (alias) = TREE_PUBLIC (ns);
push_nested_namespace (ns);
- alias = do_pushdecl (alias, /* hiding= */true);
+ alias = pushdecl (alias, /* hiding= */true);
pop_nested_namespace (ns);
if (VAR_P (decl)
&& CP_DECL_THREAD_LOCAL_P (decl)
/* Record DECL as belonging to the current lexical scope. Check for
errors (such as an incompatible declaration for the same name
- already seen in the same scope). IS_FRIEND is true if DECL is
- declared as a friend.
+ already seen in the same scope).
+
+ The new binding is hidden if HIDING is true (an anticipated builtin
+ or hidden friend).
Returns either DECL or an old decl for the same name. If an old
decl is returned, it may have been smashed to agree with what DECL
says. */
-static tree
-do_pushdecl (tree decl, bool hiding)
+tree
+pushdecl (tree decl, bool hiding)
{
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
if (decl == error_mark_node)
return error_mark_node;
return decl;
}
-/* Record a decl-node X as belonging to the current lexical scope.
- The new binding is hidden if HIDING is true (an anticipated builtin
- or hidden friend). */
-
-tree
-pushdecl (tree x, bool hiding)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- tree ret = do_pushdecl (x, hiding);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return ret;
-}
-
/* A mergeable entity is being loaded into namespace NS slot NAME.
Create and return the appropriate vector slot for that. Either a
GMF slot or a module-specific one. */
current_function_decl = NULL_TREE;
b = current_binding_level;
current_binding_level = level;
- x = do_pushdecl (x, hiding);
+ x = pushdecl (x, hiding);
current_binding_level = b;
current_function_decl = function_decl;
}
pushdecl_outermost_localscope (tree x)
{
cp_binding_level *b = NULL;
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
/* Find the scope just inside the function parms. */
for (cp_binding_level *n = current_binding_level;
n->kind != sk_function_parms; n = b->level_chain)
b = n;
- tree ret = b ? do_pushdecl_with_scope (x, b) : error_mark_node;
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
-
- return ret;
+ return b ? do_pushdecl_with_scope (x, b) : error_mark_node;
}
/* Process a local-scope or namespace-scope using declaration. LOOKUP
size_t i;
tree shadowed;
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
gcc_assert (level != 0);
/* If we're leaving a toplevel class, cache its binding level. */
`pushlevel_class' routine. */
gcc_assert (current_binding_level == level);
leave_scope ();
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
}
/* Set INHERITED_VALUE_BINDING_P on BINDING to true or false, as
pushdecl_class_level (tree x)
{
bool is_valid = true;
- bool subtime;
/* Do nothing if we're adding to an outer lambda closure type,
outer_binding will add it later if it's needed. */
if (current_class_type != class_binding_level->this_entity)
return true;
- subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
/* Get the name of X. */
tree name = OVL_NAME (x);
}
input_location = save_location;
}
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return is_valid;
}
/* Make the declaration(s) of X appear in CLASS scope under the name
NAME. Returns true if the binding is valid. */
-static bool
-push_class_level_binding_1 (tree name, tree x)
+bool
+push_class_level_binding (tree name, tree x)
{
cxx_binding *binding;
tree decl = x;
bool ok;
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
/* The class_binding_level will be NULL if x is a template
parameter name in a member template. */
if (!class_binding_level)
return ok;
}
-/* Wrapper for push_class_level_binding_1. */
-
-bool
-push_class_level_binding (tree name, tree x)
-{
- bool ret;
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- ret = push_class_level_binding_1 (name, x);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return ret;
-}
-
/* Process and lookup a using decl SCOPE::lookup.name, filling in
lookup.values & lookup.type. Return a USING_DECL, or NULL_TREE on
failure. */
tree
get_namespace_binding (tree ns, tree name)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
if (!ns)
ns = global_namespace;
gcc_checking_assert (!DECL_NAMESPACE_ALIAS (ns));
ret = MAYBE_STAT_DECL (ret);
}
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return ret;
}
void
set_global_binding (tree decl)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
tree *slot = find_namespace_slot (global_namespace, DECL_NAME (decl), true);
/* Force the binding, so compiler internals continue to work. */
*slot = decl;
-
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
}
/* Set the context of a declaration to scope. Complain if we are not
tree
pushdecl_namespace_level (tree decl, bool hiding)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- tree res = do_pushdecl_with_scope (decl, NAMESPACE_LEVEL (current_namespace),
- hiding);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return res;
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+ return do_pushdecl_with_scope (decl, NAMESPACE_LEVEL (current_namespace),
+ hiding);
}
/* Wrapper around push_local_binding to push the bindings for
WANT can also have LOOK_want::HIDDEN_FRIEND or
LOOK_want::HIDDEN_LAMBDa added to it. */
-static tree
-lookup_name_1 (tree name, LOOK_where where, LOOK_want want)
+tree
+lookup_name (tree name, LOOK_where where, LOOK_want want)
{
tree val = NULL_TREE;
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
gcc_checking_assert (unsigned (where) != 0);
/* If we're looking for hidden lambda things, we shouldn't be
looking in namespace scope. */
return val;
}
-/* Wrapper for lookup_name_1. */
-
-tree
-lookup_name (tree name, LOOK_where where, LOOK_want want)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- tree ret = lookup_name_1 (name, where, want);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return ret;
-}
-
tree
lookup_name (tree name)
{
A TYPE_DECL best matching the NAME is returned. Catching error
and issuing diagnostics are caller's responsibility. */
-static tree
-lookup_elaborated_type_1 (tree name, TAG_how how)
+tree
+lookup_elaborated_type (tree name, TAG_how how)
{
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
cp_binding_level *b = current_binding_level;
if (b->kind != sk_namespace)
return NULL_TREE;
}
-/* Wrapper for lookup_type_scope_1. */
-
-tree
-lookup_elaborated_type (tree name, TAG_how how)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- tree ret = lookup_elaborated_type_1 (name, how);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return ret;
-}
-
/* The type TYPE is being declared. If it is a class template, or a
specialization of a class template, do any processing required and
perform error-checking. If IS_FRIEND is nonzero, this TYPE is
Returns TYPE upon success and ERROR_MARK_NODE otherwise. */
-static tree
-do_pushtag (tree name, tree type, TAG_how how)
+tree
+pushtag (tree name, tree type, TAG_how how)
{
tree decl;
gcc_assert (identifier_p (name));
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
cp_binding_level *b = current_binding_level;
while (true)
{
return type;
}
-
-/* Wrapper for do_pushtag. */
-
-tree
-pushtag (tree name, tree type, TAG_how how)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- tree ret = do_pushtag (name, type, how);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
- return ret;
-}
-
\f
/* Subroutines for reverting temporarily to top-level for instantiation
of templates and such. We actually need to clear out the class- and
tree t, id;
size_t i;
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
for (t = names; t; t = TREE_CHAIN (t))
{
if (TREE_CODE (t) == TREE_LIST)
}
bindings_need_stored.truncate (0);
}
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
}
/* Like store_bindings, but NAMES is a vector of cp_class_binding
static GTY((deletable)) struct saved_scope *free_saved_scope;
-static void
-do_push_to_top_level (void)
+void
+push_to_top_level (void)
{
struct saved_scope *s;
cp_binding_level *b;
size_t i;
bool need_pop;
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
/* Reuse or create a new structure for this saved scope. */
if (free_saved_scope != NULL)
{
suppress_location_wrappers = 0;
}
-static void
-do_pop_from_top_level (void)
+void
+pop_from_top_level (void)
{
struct saved_scope *s = scope_chain;
cxx_saved_binding *saved;
size_t i;
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+
/* Clear out class-level bindings cache. */
if (previous_class_level)
invalidate_class_lookup_cache ();
/* Push into the scope of the namespace NS, even if it is deeply
nested within another namespace. */
-static void
-do_push_nested_namespace (tree ns)
+void
+push_nested_namespace (tree ns)
{
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
if (ns == global_namespace)
- do_push_to_top_level ();
+ push_to_top_level ();
else
{
- do_push_nested_namespace (CP_DECL_CONTEXT (ns));
+ push_nested_namespace (CP_DECL_CONTEXT (ns));
resume_scope (NAMESPACE_LEVEL (ns));
current_namespace = ns;
}
/* Pop back from the scope of the namespace NS, which was previously
entered with push_nested_namespace. */
-static void
-do_pop_nested_namespace (tree ns)
+void
+pop_nested_namespace (tree ns)
{
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
while (ns != global_namespace)
{
ns = CP_DECL_CONTEXT (ns);
leave_scope ();
}
- do_pop_from_top_level ();
+ pop_from_top_level ();
}
/* Add TARGET to USINGS, if it does not already exist there. We used
tree
pushdecl_top_level (tree x)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- do_push_to_top_level ();
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+ push_to_top_level ();
gcc_checking_assert (!DECL_CONTEXT (x));
DECL_CONTEXT (x) = FROB_CONTEXT (global_namespace);
x = pushdecl_namespace_level (x);
- do_pop_from_top_level ();
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
+ pop_from_top_level ();
return x;
}
tree
pushdecl_top_level_and_finish (tree x, tree init)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- do_push_to_top_level ();
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
+ push_to_top_level ();
gcc_checking_assert (!DECL_CONTEXT (x));
DECL_CONTEXT (x) = FROB_CONTEXT (global_namespace);
x = pushdecl_namespace_level (x);
cp_finish_decl (x, init, false, NULL_TREE, 0);
- do_pop_from_top_level ();
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
+ pop_from_top_level ();
return x;
}
int
push_namespace (tree name, bool make_inline)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
int count = 0;
/* We should not get here if the global_namespace is not yet constructed
count++;
}
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
return count;
}
void
pop_namespace (void)
{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
+ auto_cond_timevar tv (TV_NAME_LOOKUP);
gcc_assert (current_namespace != global_namespace);
current_namespace = CP_DECL_CONTEXT (current_namespace);
/* The binding level is not popped, as it might be re-opened later. */
leave_scope ();
-
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
}
/* An IMPORT is an import that is defining namespace NAME inside CTX. Find or
return decl;
}
-/* External entry points for do_{push_to/pop_from}_top_level. */
-
-void
-push_to_top_level (void)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- do_push_to_top_level ();
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
-}
-
-void
-pop_from_top_level (void)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- do_pop_from_top_level ();
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
-}
-
-/* External entry points for do_{push,pop}_nested_namespace. */
-
-void
-push_nested_namespace (tree ns)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- do_push_nested_namespace (ns);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
-}
-
-void
-pop_nested_namespace (tree ns)
-{
- bool subtime = timevar_cond_start (TV_NAME_LOOKUP);
- gcc_assert (current_namespace == ns);
- do_pop_nested_namespace (ns);
- timevar_cond_stop (TV_NAME_LOOKUP, subtime);
-}
-
/* Pop off extraneous binding levels left over due to syntax errors.
We don't pop past namespaces, as they might be valid. */