mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 03:47:02 -05:00
Move get_vector_info function definition before use.
This commit is contained in:
committed by
Marek Polacek
parent
44d49d05a5
commit
c4ad08c045
@@ -924,26 +924,6 @@ get_info_vec (location_t loc, const constexpr_ctx *ctx, tree call, int n,
|
||||
jump_target, GET_INFO_VEC, fun);
|
||||
}
|
||||
|
||||
/* Return std::vector<info>. */
|
||||
|
||||
static tree
|
||||
get_vector_info ()
|
||||
{
|
||||
tree args = make_tree_vec (1);
|
||||
TREE_VEC_ELT (args, 0) = meta_info_type_node;
|
||||
tree inst = lookup_template_class (get_identifier ("vector"), args,
|
||||
/*in_decl*/NULL_TREE,
|
||||
/*context*/std_node, tf_none);
|
||||
inst = complete_type (inst);
|
||||
if (inst == error_mark_node || !COMPLETE_TYPE_P (inst))
|
||||
{
|
||||
error ("couldn%'t look up %qs", "std::vector");
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
/* Create std::meta::exception{ what, from }. WHAT is the string for what(),
|
||||
and FROM is the info for from(). */
|
||||
|
||||
@@ -3001,6 +2981,26 @@ eval_parent_of (location_t loc, const constexpr_ctx *ctx, tree r,
|
||||
return get_reflection_raw (loc, c);
|
||||
}
|
||||
|
||||
/* Return std::vector<info>. */
|
||||
|
||||
static tree
|
||||
get_vector_info ()
|
||||
{
|
||||
tree args = make_tree_vec (1);
|
||||
TREE_VEC_ELT (args, 0) = meta_info_type_node;
|
||||
tree inst = lookup_template_class (get_identifier ("vector"), args,
|
||||
/*in_decl*/NULL_TREE,
|
||||
/*context*/std_node, tf_none);
|
||||
inst = complete_type (inst);
|
||||
if (inst == error_mark_node || !COMPLETE_TYPE_P (inst))
|
||||
{
|
||||
error ("couldn%'t look up %qs", "std::vector");
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
return inst;
|
||||
}
|
||||
|
||||
/* Build std::vector<info>{ ELTS }. */
|
||||
|
||||
static tree
|
||||
|
||||
Reference in New Issue
Block a user