diff options
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 82fda5f..bc9d538 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -9933,4 +9933,26 @@ finish_builtin_launder (location_t loc, tree arg, tsubst_flags_t complain) TREE_TYPE (arg), 1, arg); } +/* Finish __builtin_convertvector (arg, type). */ + +tree +cp_build_vec_convert (tree arg, location_t loc, tree type, + tsubst_flags_t complain) +{ + if (error_operand_p (type)) + return error_mark_node; + if (error_operand_p (arg)) + return error_mark_node; + + tree ret = NULL_TREE; + if (!type_dependent_expression_p (arg) && !dependent_type_p (type)) + ret = c_build_vec_convert (cp_expr_loc_or_loc (arg, input_location), arg, + loc, type, (complain & tf_error) != 0); + + if (!processing_template_decl) + return ret; + + return build_call_expr_internal_loc (loc, IFN_VEC_CONVERT, type, 1, arg); +} + #include "gt-cp-semantics.h" |