-O gen-C++ fixes for compatibility with GH-3249 changes

minor -O gen-C++ BTest updates
This commit is contained in:
Vern Paxson 2023-09-01 12:17:38 -07:00
parent 85cd1d69a4
commit 80eed34985
6 changed files with 19 additions and 8 deletions

View file

@ -541,7 +541,9 @@ string CPPCompile::GenAddToExpr(const Expr* e, GenType gt, bool top_level)
if ( t->Tag() == TYPE_VECTOR )
{
if ( same_type(lhs->GetType(), rhs->GetType()) )
auto& rt = rhs->GetType();
if ( IsVector(rt->Tag()) && same_type(lhs->GetType(), rt) )
add_to_func = "vector_vec_append__CPP";
else
add_to_func = "vector_append__CPP";